0

Is it possible to display row group summary text with group Value.. As shown in above, I want to set text "total" As "Gwadar-Total" and so on.

How can I achieve this at run time, which get Text from row group and display with summary Text?

I am using "summaryTpl" in cell modal.

Bernhard Barker
  • 54,589
  • 14
  • 104
  • 138
Ahmad
  • 13
  • 1
  • 5

2 Answers2

1

from http://www.trirand.com/jqgridwiki/doku.php?id=wiki:grouping you can use custom summaryType

function mysum(val, name, record)
{
return parseFloat(val||0) + parseFloat((record[name]||0));
}

jQuery("#grid").jqGrid({ 
...
colModel : [
    {..},
    {name:'amount',index:'amount', width:80, align:"right", sorttype:'number',formatter:'number',summaryType:mysum},
       ...
 ],
 ...
});

regards,

aramadhani

aramadhani
  • 53
  • 2
  • 13
1

Try this

$('#gridName tr[jqfootlevel="0"] td').each(function () {
  $(this).html($(this).html().replace('Total','Main Group Level Total'));
}); 
Mike Szyndel
  • 10,461
  • 10
  • 47
  • 63