5.5.5 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
Column Freeze https://phpgrid.com/example/column-freeze/ Sat, 20 Apr 2013 22:20:08 +0000 http://phpgrid.com/?p=2452 You can now use the set_col_frozen() method to set the column freeze method. It’s useful when working with a big table with many columns. The freezing column must start from the very left and then one by one to the right. 12345678// Always include namespace and conf.php on TOP of the script. use phpCtrl\C_DataGrid; require_once("/file/path/to/conf.php"); […]

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

]]>
You can now use the set_col_frozen() method to set the column freeze method. It’s useful when working with a big table with many columns. The freezing column must start from the very left and then one by one to the right.

1
2
3
4
5
6
7
8
// Always include namespace and conf.php on TOP of the script.
use phpCtrl\C_DataGrid;
require_once("/file/path/to/conf.php");  

$dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");
$dg->set_dimension(600, 400, false);
$dg->set_col_frozen('orderNumber');
$dg -> display();

Note that it is recommended to set text not to wrap with CSS “nowrap”. See http://phpgrid.uservoice.com/knowledgebase/articles/154972

See Live Example!

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

]]>
2452
set_grid_method() https://phpgrid.com/documentation/set_grid_method/ Sat, 20 Apr 2013 21:25:24 +0000 http://phpgrid.com/?p=2450 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 […]

The post set_grid_method() appeared first on phpGrid - PHP Datagrid.

]]>
  • 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:
  • 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))));

    The post set_grid_method() appeared first on phpGrid - PHP Datagrid.

    ]]>
    2450
    set_col_frozen() https://phpgrid.com/documentation/set_col_frozen/ Sat, 20 Apr 2013 04:55:43 +0000 http://phpgrid.com/?p=2449 Parameter(s): $col_name: Column name Description: Similar to Excel column freeze, phpGrid can now freeze column(s) Remark: Note that the frozen columns should be from left to right, one after other. In inline edit, the frozen columns are not editable. Columns are not draggable if any column is frozen Example: 12// freeze both customer_id and customer_name […]

    The post set_col_frozen() appeared first on phpGrid - PHP Datagrid.

    ]]>
  • Parameter(s):
    • $col_name: Column name
  • Description:
    • Similar to Excel column freeze, phpGrid can now freeze column(s)
  • Remark:
    • Note that the frozen columns should be from left to right, one after other.
    • In inline edit, the frozen columns are not editable.
    • Columns are not draggable if any column is frozen
  • Example:
  • 1
    2
    // freeze both customer_id and customer_name columns
    $dg -> set_col_frozen("customer_id")->set_col_frozen("customer_name"):

    The post set_col_frozen() appeared first on phpGrid - PHP Datagrid.

    ]]>
    2449