Hello,
I implemented remote sorting and filtering as in the example here https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/remote-data-operations. It works well, but when I add group by it does not work properly. The grouping is not working and it does group by properly only after I do manual sorting on the column after which I did group by.
Can you help me with this issue? What am I missing?
Thanks,
Anca
Hello Anca,
Thank you for posting to Infragistics Community!
I have been looking into your question and I would like to ask you to please elaborate on what aspect of the group by is not working, i.e. describe your scenario, executed steps, expected result and actual result. You could also take a look at this StackBlitz sample of a grid with remote data, sorting and filtering. Could you please try grouping by the “CategoryID” column and tell whether the observed behavior is reproducible there? I am asking this because the sample seems to lead to the same result (12 grouped records of CategoryID “1”) regardless of whether the “CategoryID” column was initially sorted or not.
Actually, as grouping relies on data being sorted, you will notice that the sortingExpressionsChange output is emitted upon grouping as well and causes the records to be sorted in ascending order. Consequently, grouping seems to work as expected.
Also please keep in mind that the grid will work with the records available within it at the time of grouping and given that data is loaded on chunks and therefore not all of it is loaded at the same time, which is the point of load on demand. This would explain why with scrolling and loading more/less records of a group, the number of records within it may change as only the available records in the grid are reflected.
I can suggest also checking out this discussion in our GitHub Repo, where the possibility of remote grouping is queried and a detailed explanation on the existing considerations is given.
Thank you for your cooperation. Looking forward to hearing from you.
Sincerely,Bozhidara PachilovaAssociate Software Developer
Thank you for you answer.
Your StackBlitz sample helped me a lot. I discovered a mistake I was making at sorting. I fix it and the grouping works as expected now.
Sincerely,
Hi Anca,
I am glad that you were able to resolve the issue. Thank you for using Infragistics components!
Best regards,Bozhidara Pachilova