How to do multiple sorting via javascript? and with different order
I saw on documentation that sort method
only accept one columnMy table properties :
<table class="easyui-datagrid" title="Multiple Sorting" style="width:700px;height:250px"
data-options="singleSelect:true,collapsible:true,
url:'datagrid_data1.json',
method:'get',
remoteSort:false,
multiSort:true
">
So how to make it multiple sort?
I tried like this
$('#dg').datagrid('sort', { // FIRST SORT -- ASCENDING
sortName: 'name',
sortOrder: 'asc'
});
$('#dg').datagrid('sort', { // SECOND SORT -- DESCENDING
sortName: 'productid',
sortOrder: 'desc'
});
and the SECOND SORT will reset the FIRST SORT
here the fiddle for sandbox (just sort the productname and unitcost)
http://jsfiddle.net/v6njm7a7/Thank you in advance
