I’m using a grid with inline editing as in the example at http://www.guriddo.net/demo/demos/jqgrid/editing_data/inlinecustom/default.php
Here’s my code:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
$grid->setGridOptions(array( "hoverrows"=>false, "footerrow"=>true, "userDataOnFooter"=>true )); $summaryrows = array("col1"=>array("col1"=>"SUM"), "col2"=>array("col2"=>"SUM")); onselrow = <<< ONSELROW function(rowid, selected) { if(rowid && rowid !== lastSelection) { $("#grid").jqGrid('restoreRow', lastSelection); $("#grid").jqGrid('editRow', rowid, true); lastSelection = rowid; } } ONSELROW; $grid->setGridEvent('ondblClickRow', $onselrow); $grid->renderGrid('#grid','#pager',true, $summaryrows, null, true,true); |
I have set it to the ‘ondblClickRow’ event instead of ‘onSelectRow’ and it works OK, except the sums in the summaryrow are not updated after cells are edited. I need to do a manual refresh to see correct sums.
Is there a way to automatically update the sums or trigger a grid refresh after editing inline?
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top