gridheader Archives | phpGrid - PHP Datagrid Create PHP grids in minutes, not hours. Fri, 06 Dec 2024 03:58:54 +0000 en-US hourly 1 CodeProjecthttps://wordpress.org/?v=7.0.3 129966043 Column Methods https://phpgrid.com/example/column-methods/ Sat, 20 Apr 2013 22:34:45 +0000 http://phpgrid.com/?p=2453 Version 5.5.5 introduced set_grid_method() method. You can use this method to call any jqGrid javascript method that can perform actions on the grid as a whole. However, it’s not possible to manipulate the grid on a row or cell level using set_grid_method. The example below demonstrates set_grid_method to grouping header by calling the jqGrid “setGroupHeader” […]

The post Column Methods appeared first on phpGrid - PHP Datagrid.

]]>
Version 5.5.5 introduced set_grid_method() method. You can use this method to call any jqGrid javascript method that can perform actions on the grid as a whole. However, it’s not possible to manipulate the grid on a row or cell level using set_grid_method.

The example below demonstrates set_grid_method to grouping header by calling the jqGrid “setGroupHeader” method.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use phpCtrl\C_DataGrid;
require_once("/file/path/to/conf.php");  

$dg = new C_DataGrid("SELECT * FROM payments", "customerNumber", "orders");

$dg->set_col_width("customerNumber", 30);
$dg->set_col_width("checkNumber",50);
$dg->set_col_width("amount",50);

$dg->set_grid_method('setGroupHeaders',
                        array(
                            array('useColSpanStyle'=>true),
                            'groupHeaders'=>array(
                            array('startColumnName'=>'customerNumber',
                            'numberOfColumns'=>2,
                            'titleText'=>'Numbers Header')
                        )));

$dg->display();

See Live Example!

The post Column Methods appeared first on phpGrid - PHP Datagrid.

]]>
2453