Giter Club home page Giter Club logo

kendogridbinder's Introduction

KendoGridBinder

The code from this GitHub project has been moved to KendoGridBinderEx.

kendogridbinder's People

Contributors

automagic avatar cemeron avatar dandrayan avatar joshball avatar rwhitmire avatar stefh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kendogridbinder's Issues

Bug in KendoGridBinder when you use datasource outside a grid

Hi, the binder code search items assuming order..

-                    Field1 = GetQueryStringValue(group[0]),
-                    Operator1 = GetQueryStringValue(group[1]),
-                    Value1 = GetQueryStringValue(group[2])

If you use the binder with combo box, the post came in diferent order.

  •                Field1 = GetValue(filterKeys, index, "field"),
    
  •                Operator1 = GetValue(filterKeys, index, "operator"),
    
  •                Value1 = GetValue(filterKeys, index, "value")
    

This works ok. I have no problem to make this fix, can can you give me some indications on how? (tests, etc.)

'AND' or 'OR' in single filter are always translated to &&

A filter like : "CompanyName is equal to A' OR "CompanyName is equal to B' is translated to:
"(Company.Name.ToLower() == "a" && Company.Name.ToLower() == "b")" but it should be like
"(Company.Name.ToLower() == "a" || Company.Name.ToLower() == "b")"

This is because this code:
var combined = string.Format("({0} {1} {2})", expression1, request.FilterObjectWrapper.LogicToken, expression2);

is taking the logic from the Wrapper and not from the filterObject.

See my project on github for the fix.

Total records

In KendoGrid.cs, shouldn't the total records returned be set after the filters are applied to the data? Here's the function in question.

public KendoGrid(KendoGridRequest request, IQueryable query)
{

        var filtering = GetFiltering(request);
        var sorting = GetSorting(request);

        total = query.Count();

        data = query
            .Where(filtering)
            .OrderBy(sorting)
            .Skip(request.Skip)
            .Take(request.Take);
    }

Remote grouping not implemented

Remote grouping still needs to be implemented. This is an example of the required json object:

{
 groups: [
    {
    field = "FirstName",
        aggregates = {},
        hasSubgroups = false,
        items = [ { FirstName = "First Name", LastName = "Last Name 1" },
          { FirstName = "First Name", LastName = "Last Name 2" }],
        value = "First Name"
        },
        {
    field = "FirstName",
        aggregates = {},
        hasSubgroups = false,
        items = [ { FirstName = "First Name 2", LastName = "Last Name 3" },
          { FirstName = "First Name 2", LastName = "Last Name 4" }],
        value = "First Name 2"
        }]
}

source: http://www.kendoui.com/forums/framework/data-source/datasource-remote-grouping.aspx

KendoGrid object creation is too difficult

creation of a KendoGrid object for serialization is too complicated. Lists must be converted to Queryable objects and json serialization on poco classes can result in a circular reference. This must be abstracted and simplified!

Datatypes other than strings don't filter properly

boolean and number columns don't filter properly. I suspect this is a result of case-sensitivity elimination in the last update. the datatype of a value will have to be determined before filtering can occur.

Demo site not working

Hi,
The demo link that you've provided is not working.

I've also tried the code on my project but getting an error. The error comes when I try to serialize the JSON object. Is this a known bug? If yes, can you look into it?

My error message is as below
"Error getting value from 'ServerVersion' on 'System.Data.EntityClient.EntityConnection'. The connection is not open."

NOTE: When I serialize other JSON objects, I don't face any problem. The problem appears only when I serialize JSON object which has been created using KendoGrid<>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.