The documentation about custom sorting strategy says:
jsGrid.sortStrategies.client = function(index1, index2) { var client1 = clients[index1]; var client2 = clients[index2]; return client1.Name.localeCompare(client2.Name) || client1.Age - client2.Age; };
It seems that the args of the function are indexes of the data array, but running it I got the values to compare. Does the documentation need to be edited or is a code bug?
The documentation about custom sorting strategy says:
jsGrid.sortStrategies.client = function(index1, index2) { var client1 = clients[index1]; var client2 = clients[index2]; return client1.Name.localeCompare(client2.Name) || client1.Age - client2.Age; };
It seems that the args of the function are indexes of the data array, but running it I got the values to compare. Does the documentation need to be edited or is a code bug?