Hi,
I'm having some trouble working with the remote features. I have a grid with remote sorting and remote grouping. I am specifying the sortUrlKey, sortUrlKeyAscValue, sortUrlKeyDescValue, groupByUrlKey, groupByUrlKeyAscValue and groupByUrlKeyDescValue. If I remove the GroupBy feature from my grid sorting works as I expect it to, but when I add in the grouping my QueryString isn't what I would expect to see. The sorted column is passed in the GroupBy not the Sort that it is passed in without the group by.
For example, I have a column called Title, if I sort by Title with Grouping Enabled my QueryString is:
"groupBy(Title)=asc&page=0&pageSize=25&_=1523460956048"
If I comment out the GroupBy Feature it's:
"orderby(Title)=asc&page=0&pageSize=25&_=1523461045306"
{ name: "Sorting", type: "remote", mode: 'single', sortUrlKey: "orderby", sortUrlKeyAscValue: 'asc', sortUrlKeyDescValue: 'desc', columnSettings: [ { columnKey: 'Actions', allowSorting: false } ] },
{ name: "GroupBy", type: "remote", groupByUrlKey: "groupBy", groupByUrlKeyAscValue : "asc", groupByUrlKeyDescValue : "desc", columnSettings: [ { columnKey: 'Actions', allowGrouping: false } ] }
I still have the same problem if I change the sorting mode to multi. What am I doing wrong?
Hello Rebecca,
Thank you for posting in our forum.
What the remote GroupBy feature is doing, is that it's actually using the remote Sorting and then grouping the server response results locally - that is why in the query string you get the GroupBy parameters only.
Providing some more detailed information about why you need both the Sorting and the GroupBy parameters in the query string would be appreciated. In case you need any additional assistance, feel free to contact me.
I'm working with girds that have millions of records and need to do sorting and grouping remotely.
As Vasil explained the remote GroupBy is doing remote Sorting. This is the reason our igGrid MVC Wrapper uses the same key for groupByUrlKey and sortUrlKey, so I suggest you try to set "orderby" as a value for groupByUrlKey.
As for the multiple Sorting you have to parse multiple sortUrlKey parameters:
"GetData?sort(Name)=asc&sort(ProductNumber)=asc"
Best regards,
Martin Pavlov Infragistics, Inc.