It didn't fix. I checked with adding more data.
I have below columns
'name','pname','status','prname','pn','rf','tx','txn','nd','dt','amount','hp'
so I added in column like this
"amount" => [
"label" => 'Amount',
'formatValue'=>function($value, $row, $cKey)
{
return '$'.$row['amount'];
},
"type" => "num-fmt",
"render" => "function(data, type, row, meta) {
var customerGroupName = row[0]; // because group field 'customerName' index is 0
var customerGroupAmount = groupAmount[customerGroupName];
return (type !== 'sort' || customerGroupAmount === undefined) ?
$.fn.dataTable.render.number( '.', ',', 0, '' ).display(data) : customerGroupAmount;
}"
],
In client row group below code
'totalAmount' => [
'sum', //'sum', 'count', 'avg', 'min', 'max'
'amount',
"format" => "function(agg) {
groupAmount[group] = agg; // save group amount of this customer group
return '$'+agg.toFixed(2);
}",
],
Also added below
"onReady" => "function() {
myTable1
.order( [ 10, 'desc' ] ) // sort 'dollar_sales' field, index of which is 3
.draw();
}"
It is not showing in desc order. Please check and advise. ASAP.