This is a migrated thread and some comments may be shown as answers.

Group By Then Limit Page Size

1 Answer 173 Views
Grid
This is a migrated thread and some comments may be shown as answers.
FlexDigital
Top achievements
Rank 1
FlexDigital asked on 07 Jun 2014, 03:24 PM
I have a problem and I can't figure out how to solve.

1.  I'd like to present a list of records, grouped by a single column and the default (initial) presentation to the user should have the group collapsed, hiding the detail records for the user.  (I think we've got this one figured out).

2.  in addition to 1 above, I would like to apply the grouping on the server side before the Page size is applied.  The end result being if we have a Page Size of 10, we will show 10 groups, collapsed, regardless of how many detail records there are.  Basically set the paging on the grouping not the total number of detail records.

Any thoughts on how to accomplish this will be greatly appreciated.

 

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 10 Jun 2014, 02:41 PM
Hi Bo,

The groups could be collapsed initially by calling the collapseGroup method once the Grid's dataBound event is triggered. I am afraid however, that displaying 10 groups with a pageSize of 10 is only possible if there is only one item in each group. In case the user is not allowed to change the grouping options, then you could use a hierarchical Grid as a workaround.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
FlexDigital
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or