- Parameter(s):
- parameter: A variable argument. Variable argument makes the function more flexible because different jqGrid methods will have different set of parameters. Super useful.
- Description:
- Calling a jqGrid method to perform a specific action on the current grid. It is considered an advanced method.
- A list of basic methods can be found here: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods
- Remark:
- Available in 5.5.5 and higher.
- Starting version 6, the parameter becomes a single variable argument.
- Only use this method to call jqGrid methods that can act on the grid as a whole. It’s NOT possible to manipulate the grid on a row or cell level using set_grid_method because the generated javascript code is appended to the end of the script before closing bracket.
- Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | // create group header using this method $dg->set_grid_method('setGroupHeaders', array( array('useColSpanStyle'=>true), 'groupHeaders'=>array( array('startColumnName'=>'customerNumber', 'numberOfColumns'=>2, 'titleText'=>'Numbers Header') ))); // inline edit add new row $dg->set_grid_method('inlineNav', '#'. $this->jq_gridName .'_pager1', array('addParams' => array( 'position'=> "last", 'addRowParams'=>array( 'keys'=>true)))); |