Radgrid paging based on groups

4 posts, 0 answers
  1. Kelly
    Kelly avatar
    18 posts
    Member since:
    May 2014

    Posted 19 May 2014 Link to this post

    Hi,
    We are not able to implement paging on the basis of groups. For example we have 5 groups and have 10 rows in each group then if we set page size to 4 then first 4 groups should be displayed and 5th group should be displayed on 2nd page. But what happens is that only 4 rows of Ist group is displayed and 12 page numbers were created.

    We have to implement paging based on groups while it is happening based on total records in the groups.

    Please help. Its urgent.
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 20 May 2014 Link to this post

    Hi Kelly,

    Grouping is actually applied only on the items rendered on the current page, so collapsing a group cannot get the items from another page (in grouped view). To implement this would mean that the grid will require full datasource in order to be able to group items that are not in the current page,  which contradicts the base design of the control. The idea of the grid is to show data from your database, and if you do custom paging and send to the grid only X items, you can not expect the grid to group on X+Y items. If it is suitable for you can use the RadPivotGrid which design allows to group before paging, as it is made to support DataSources that also can do this.

    Regards,
    Pavlina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kelly
    Kelly avatar
    18 posts
    Member since:
    May 2014

    Posted 20 May 2014 in reply to Pavlina Link to this post

    Our issue is not in collapsing or grouping the items. Issue is with implementation of paging when grouping is used.

    It seems that I am not able to explain my question. Let me rephrase it:
    For example: Items are grouped based on date and its getting displayed perfectly fine.
    Now we have set page size to 5. 
    There are 5 groups having 10 rows in each group. This means we have total of 50 data items (5 group X 10 rows) 
    What we see in radgrid paging it shows Items 1 to 5 of 50 and 10 page numbers are displayed. It has done paging based on total records i.e. 50 not on number of groups i.e, 5
    but we need that paging should display only 1 page and written as Items 1 to 5 of 1






  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 26 May 2014 Link to this post

    Hi Kelly,

    I am afraid that due to the current implementation of the RadGrid control this functionality could not be implemented. Please excuse us for the inconvenience caused.

    In general you can set RadGrid PageSize to whatever value you need. However in current page the RadGrid will show only page size GridDataItems regardless whether grouping is applied or not. If you need to set PageSize to the number of the groups you should manually calculate the groups that will be formed.


    Regards,
    Pavlina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top