Hi, I'm trying to use the remote sorting and grouping features.
According to the forums I have set the urlSort key to the odata URI protocol.
{ name: 'Sorting', type: "remote", sortUrlKey: "$orderby", sortUrlKeyAscValue: "asc", sortUrlKeyDescValue: "desc", columnSettings: [ {columnKey: "IsNew", allowSorting: false} ], }, { name: "GroupBy", type: "remote", allowGrouping: true }
But it seems like the feature setting gets ignored.
The request query still comes out as
Please can u assist.
Thanks in advance.
Hi,
the grid uses OData encoding for all of its features by default, if you don't set the keys explicitly. so basically you don't need to change any of the options. Let me know if this helps
Thanks,
Angel
Hi Angel, I did try to the default configuration before setting the keys explicitly. But still has the same effect on the orderby query parameters.
{ name: 'Sorting', type: "remote", columnSettings: [ {columnKey: "IsNew", allowSorting: false} ], }, { name: "GroupBy", type: "remote" },
The complete grid initialization script:
$("#table").igGrid({ dataSource : dSource, autoGenerateColumns : false, alternateRowStyles : true, showHeader : true, showFooter : false, jQueryTemplating : true, rowTemplate : $("#rowTemplate").html(), columns: [ { headerText: "", key: "IsNew", dataType: "bool", width: 28 }, { headerText: "Routed", key: "HasBeenRouted", dataType: "bool", width: 28, hidden:true }, { headerText: "Escalated", key: "HasBeenEscalated", dataType: "bool", width: 28, hidden:true }, { headerText: "Description", key: "DisplayName", dataType: "string", width: 130 }, { headerText: "No", key: "Id", dataType: "number", width: 25 }, { headerText: "Group", key: "ProcessGroupId", width: 50 }, { headerText: "From", key: "Originator", width: 70 }, { headerText: "Participant", key: "CurrentParticipant", width: 70 }, { headerText: "Received", key: "ActivationDate", dataType: "date", format: "dateTime", width: 45 }, { headerText: "Due", key: "DueDate", dataType: "date", format: "dateTime", width: 45 } ], features: [ { name: 'Paging', pageSize: 25, recordCountKey: "Total", showFirstLastPages : true, showPagerRecordsLabel: true, showPageSizeDropDown: false, showPrevNextPages: true }, { name: 'Sorting', type: "remote", columnSettings: [ {columnKey: "IsNew", allowSorting: false} ], }, { name: "GroupBy", type: "remote" }, { name: "Filtering", mode: 'simple', allowFiltering: true, caseSensitive: false, columnSettings: [ {columnKey: "IsNew", allowFiltering: false} ], filterDropDownItemIcons: true, } ] });
Thanks