Grid with server side pagination and grouping

Hello

I am implementing a grid with server side pagination and I also added  grouping option.

The problem is that the grouping is not being done correctly, it is only grouping on the records that the component has loaded at that moment. Is there any possibility that the grouping works correctly with pagination from the server?

This is an example of my problem.


If i made a group by customer i see "Customer Name: ALFKI" in two different pages instead in one page.

Thank you!

2 Replies 1 reply marked as answer

RS Rajapandiyan Settu Syncfusion Team May 21, 2021 02:26 PM UTC

Hi Victor,  
  
Based on your requirement, you need to perform grouping at server side in Custom-Binding feature. Currently, we are checking the feasibility of reported requirement at our end. So, we will update the further details on May 25th 2021. 
 
Until then, we appreciate your patience. 
 
   
Regards,  
Rajapandiyan S  



RS Rajapandiyan Settu Syncfusion Team May 25, 2021 03:31 PM UTC

Hi Victor,  
  
Thanks for your patience.  
  
Based on your requirement, you want to show the same type of grouped item records on single page.  
  
In EJ2 Grid, the grouping actions are performed based on the pageSize (number records per page) property. If the Grid has pageSize as 12, then groupings are performed with the first 12 records only (grouped field sorted in ascending order).   
  
For example, consider the Grid has Fruits column with value as “apple” (15 records), “banana” (9 records) and “mango” (10 records). If I group the Fruits column in Grid, it sorts the Fruits column in ascending order and fetches the current page records (current page size is 12), and performs the grouping action with these records.  
  
So, the first 12 items of apple is shown on the first page, the remaining 3 items are shown on second page, 9 items of banana are shown on second page and 10 items of mango shown on third page.  
  
If you increase the pageSize as 15 to show all the grouped items of apple on single page, then all the 15 items are shown on first page, all the 9 items of banana shown on second page, but the 10 items of mango has split in second and third page (i.e. 6 items of mango showed on second page and remaining shown on third page).   
  
By default, if the number of grouped items count exceeds the current pageSize then it will be shown on next page. This is the default behavior of EJ2 Grid.  
  
So, it is not possible to show the same Grouped items records in single page.  
  
Please get back to us if you need further assistance with this.  
  
Regards,  
Rajapandiyan S 


Marked as answer
Loader.
Up arrow icon