Hi Abu and developers. I've the premium version, and this is my very first time here. I will start with a simple question. I was able to create the footer-row, with total, subtotal and grand total, and total to selected rows are working too, but I just want a total considering the filters and search options, in other words, 1000 rows, total price for these 1000, search/filter reduces to 500 registers, total price for that, not considering the pages of the grid. My idea is to change the code http://pastebin.com/JGj1Dqgq, using something like: $swhere = $_GET['sfilter']; and $rs = mysql_fetch_assoc(mysql_query("SELECT SUM(vlr_cust_total) as s FROM (SELECT vlr_cust_total FROM cdr WHERE $swhere ORDER BY $sidx $sord LIMIT $rows) AS tmp"));. Could you please help me? Thanks in advance.
Hello,
Given that your grid id is list1, you can use following session variable.
$swhere = 'WHERE 1=1 ' . $_SESSION["jqgrid_list1_filter"];
This session var will contains string like 'AND invdate like %2007%' or empty string if nothing is filtered.
Hi Abu. Thanks a lot. It's working fine. I think this is very useful for all and several other situations. I removed the LIMIT and change to $swhr = '1=1 '.$_SESSION["jqgrid_cdr1_filter"]; $rs = mysql_fetch_assoc(mysql_query("SELECT SUM(vlr_cust_total) as s FROM (SELECT vlr_cust_total FROM cdr WHERE $swhr ORDER BY $sidx $sord) AS tmp")); Thanks again.