hi sir,
How to use number formatter for the grouping summary field.
When i use $col["formater"] Footer Summary or the filter summary is not shown
How to solve this issue.Please help me as early as possible.Its very urgent.
Thank you
Try setting footerData last arg to false. e.g.
// 4th arg value of false will disable the using of formatter
grid.jqGrid('footerData','set', {id: 'Total: ' + sum.toFixed(2), invdate: 'Sub Total: '+sum_running, total: 'Grand Total: '+sum_table}, false);
Previous reply was for footer row summary.
For grouping, you can have formatting in php code:e.g.
$data["params"]["userdata"] = array("note"=>"Grand Summary","total"=>"Total: $".$total);
Code: http://www.phpgrid.org/demo/demos/appearence/grouping.phps
Demo: http://www.phpgrid.org/demo/demos/appearence/grouping.php
hi
thank you sir
i have followed the Grouping Example.phpgriddemosappearencegrouping.php
how to apply the solution given by you
Hi sir
I have used this sample and got the grid also.
I wanted to format the total column to be a currency format .so i tried but got grouping total is not getting calculated because the comma separated value cannot be used to sum.How to do this?
Thank you
$col = array();
$col["title"] = "Sales Litre ";
$col["name"] = "SALELITER";
$col["editable"] = false;
$col["align"] = "right";
$col["formatter"] = "number";
$col["formatoptions"] = array("thousandsSeparator" => ",",
"decimalSeparator" => ".",
"decimalPlaces" => 2);
$col["sortable"] = false; // this column is not sortable
$col["search"] = false; // this column is not searchable
$col["summaryType"] = "sum"; // available grouping fx: sum, count, min, max, avg
$col["summaryTpl"] = '<b>Sub Total: {0} Ltr</b>'; // display html for summary row – work when "groupSummary" is set true. search below
$testt=$col["summaryTpl"];
$col["hidden"] = false;
$cols[] = $col;
Working demo:
Code: http://pastebin.com/zgRZ1hW2
Result: http://screencast.com/t/a2agWXrKiimZ
Thank you sir
for your passion 9494 when i use formatter i dont the the group summary value.
That is my issue.
Thank you
Hi,
I don't understand your query. Please explain with more details / code / screenshot.
Please refer the code and compare with your implementation.
// $grid["userDataOnFooter"] = true; // Fill footer row with userdata (with on_data_display event)
// to use footerdata without formatter, comment above and use this
$grid["loadComplete"] = 'function(){ var userData = jQuery("#list1").jqGrid("getGridParam","userData"); jQuery("#list1").jqGrid("footerData","set",userData,false); }';
Sir, I try to see your sample code from http://www.phpgrid.org/demo/demos/appearence/grouping.phps but it appear message that the page not found. Would you fix it?
Fixed appearEnce typo:
Visit this:
Code: http://www.phpgrid.org/demo/demos/appearance/grouping.phps
Demo: http://www.phpgrid.org/demo/demos/appearance/grouping.php