Hello,
Since it looks like jqGrid is not supporting multi-column sorting natively, I have tried to implement a custom sort which is acting like a multi-column sorting on my json data.
Since I'm new to jqGrid, I post it here, so anyone can feel free to comment and give feedback about this way to do it.
Anyway, it's far from perfect since the sort icon are not synchronized with the actual sorting ( only one arrow in one column is 'selected' ), but at least it gives a way to sort on more than one column.
Thanks in advance for your feedback on the below code.
Best regards,
Christophe
Step 1)
declaring two global variables which will contain the information about the sorting:
// this array contains the ordered list of index name in which the sorting has to be applied
var vmOverviewTableSortingOrderedList = new Array();
// this associative array contains the association index name => order
var vmOverviewTableSortingHash = new Array();
Step 2)
declaring a global method which will update the two global variables on each sorting request from the user
function updateVmOverviewTableSorting(propertyName, order)
{
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top