הנה הקוד..
זה הטבלה של הjqgrid--אני רוצה למיין את השורות לפי הprice והוא ממיון את הprice רק בתוך כל group וצריך מיון על הsum של הprice
$("#result").jqGrid({
contentType: "application/json; charset=utf-8",
datatype: 'json', mtype: 'get',
colNames: ['Firstname','Amount', 'price'],
colModel: [
{ name: 'FirstName', index: 'FirstName', align: 'left', resizable: false, sortable: false,sorttype: function (cellValus, rowData) { return rowData.price; } },
{ name: 'Amount', index: 'Amount', align: 'left', resizable: true, width: '200' },
{ name: 'price', index: 'price', align: 'left', resizable: false, sortable: true,sorttype: 'currency', summaryType: 'sum', formatter: 'currency', formatoptions: { decimalSeparator: ".", thousandsSeparator: ",", decimalPlaces: 2, prefix: "$ ", sorttype: 'currency'} },
],
pager: $('#pager'),
sortorder: 'desc',
sortname: 'price',
rownumbers: true,
hoverrows: true,
height: '100%',
shrinkToFit: true,
autowidth: true,
loadonce: true,
footerrow: true, // the footer will be used for Grand Total
userDataOnFooter: true,
grouping: true,
groupingView: {
groupField: ['FirstName'],
groupSummary: [true],
groupColumnShow: [false],
groupText: ['<b>{1}-{0}:</b>'],
groupCollapse: true,
groupDataSorted: true,
groupSorted: true,
sortable: true,
showSummaryOnHide: true
},