Grid group and datatype change?

4 posts, 0 answers
  1. Greg
    Greg avatar
    18 posts
    Member since:
    Nov 2012

    Posted 29 Feb Link to this post

    Question around grouping. I've noticed that when the grid's read happens it calls the assigned web method as you would expect. What I have noticed that the code below produced two different results. One for grouped data and another type for all other grid alterations (filters and sorts).

    Sample code:

    Dim temp As IQueryable = grid.ToDataSourceResult(request).Data.AsQueryable

    No grid alterations or filtering or sorting the data type of the above object is:

    System.Linq.EnumerableQuery(Of myDataType)

    Apply one or more groups and the data type becomes:

    System.Linq.EnumerableQuery(Of Kendo.Mvc.Infrastructure.AggregateFunctionsGroup)

     

    Why does this happen? Have we implemented something incorrectly?

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 02 Mar Link to this post

    Hello Greg,

    This behavior is expected when the ServerOperation option is enabled. Basically, the Grid expected the grouping to be performed on the server-side, and this is exactly what the ToDataSourceResult method does.

    Regards,
    Alexander Popov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Greg
    Greg avatar
    18 posts
    Member since:
    Nov 2012

    Posted 02 Mar in reply to Alexander Popov Link to this post

    Thanks for the reply.

    What I am wondering is there a way to get all the rows out of result without having to recursively navigate through the nested groups?

  5. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 03 Mar Link to this post

    Hi Greg,

    I am afraid this is not possible when the data has been grouped.

    Regards,
    Alexander Popov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready