display Archives | phpGrid - PHP Datagrid Create PHP grids in minutes, not hours. Fri, 06 Dec 2024 04:14:10 +0000 en-US hourly 1 CodeProjecthttps://wordpress.org/?v=7.0.3 129966043 set_grid_style() https://phpgrid.com/documentation/set_grid_style/ Tue, 27 Apr 2021 00:24:07 +0000 https://phpgrid.com/?p=9699 * Currently only supported in the commercial licenses  set_grid_style() is a helper function for simple style update for header background, foreground, its font size, and body font size. Parameters: $parameter 1: header background color $parameter 2: header foreground color $parameter 3: header font size $parameter 4: body font size Description: helper function for simple style […]

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

]]>
* Currently only supported in the commercial licenses 

set_grid_style() is a helper function for simple style update for header background, foreground, its font size, and body font size.

  • Parameters:
    • $parameter 1: header background color
    • $parameter 2: header foreground color
    • $parameter 3: header font size
    • $parameter 4: body font size
  • Description:
    • helper function for simple style update for header background, foreground, its font size, and body font size.
  • Remark:
    • This function is intended for users who are only new to CSS to provide very basic color and font style update.
    • To further customize the grid, it is recommended to use an alternative theme or simply use CSS.
  • Example:
1
$dg->set_grid_style('#ff2288', 'white', '16px', '13px');

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

]]>
9699
Bootstrap Grid Layout https://phpgrid.com/example/bootstrap-grid-layout/ Tue, 02 Apr 2019 22:09:23 +0000 http://phpgrid.com/?p=9519

The datagrid can also be displayed and positioned easily in a Bootstrap Grid System layout, uses a series of containers, rows, and columns to the layout that is fully responsive. 12345678910111213141516<div class="container"> <div class="row"> <div class="col-md-4">.col-md-4</div> <div class="col-md-4">.col-md-4 <?php use phpCtrl\C_DataGrid; require_once("/file/path/to/conf.php");   $dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders"); $dg -> set_theme('bootstrap'); […]

The post Bootstrap Grid Layout appeared first on phpGrid - PHP Datagrid.

]]>

The datagrid can also be displayed and positioned easily in a Bootstrap Grid System layout, uses a series of containers, rows, and columns to the layout that is fully responsive.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<div class="container">
<div class="row">
<div class="col-md-4">.col-md-4</div>
<div class="col-md-4">.col-md-4
<?php
use phpCtrl\C_DataGrid;
require_once("/file/path/to/conf.php");  

$dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");
$dg -> set_theme('bootstrap');
$dg -> display();
?>
</div>
<div class="col-md-4">.col-md-4</div>
</div>
</div>

See Live Example!

The post Bootstrap Grid Layout appeared first on phpGrid - PHP Datagrid.

]]>
9519
One Table, Multiple Datagrids https://phpgrid.com/example/multiple-datagrid-instances-from-the-same-table/ Thu, 17 Oct 2013 18:37:46 +0000 http://phpgrid.com/?p=2653 You can certain have more than one datagrid instances from the same database table. Just make sure to give each unique name using set_jq_gridName() method. 12345678910111213// 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 -> enable_edit(); $dg -> display(); […]

The post One Table, Multiple Datagrids appeared first on phpGrid - PHP Datagrid.

]]>
You can certain have more than one datagrid instances from the same database table. Just make sure to give each unique name using set_jq_gridName() method.

1
2
3
4
5
6
7
8
9
10
11
12
13
// 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 -> enable_edit();
$dg -> display();

$dg2 = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");
$dg2 -> set_jq_gridName('order2');
$dg2 -> set_caption("order 2");
$dg2 -> enable_edit();
$dg2 -> display();

See Live Example! (scroll to the right view the 2nd grid)

The post One Table, Multiple Datagrids appeared first on phpGrid - PHP Datagrid.

]]>
2653
display_script_includeonce() https://phpgrid.com/documentation/display_script_includeonce/ Tue, 08 Jan 2013 20:21:53 +0000 http://phpgrid.com/?p=2371 Parameter(s): None Description: Includes required Javascript libraries before displaying our grids. Remark: Developers don’t need to call this method to include required Javascript libraries (jqGrid, jwysiwyg, ajaxfilupload etc.) because the phpGrid includes those Javascript automatically for you. This method is only used in get_display() in a MVC framework.

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

]]>
  • Parameter(s):
    • None
  • Description:
    • Includes required Javascript libraries before displaying our grids.
  • Remark:
    • Developers don’t need to call this method to include required Javascript libraries (jqGrid, jwysiwyg, ajaxfilupload etc.) because the phpGrid includes those Javascript automatically for you. This method is only used in get_display() in a MVC framework.
  • The post display_script_includeonce() appeared first on phpGrid - PHP Datagrid.

    ]]>
    2371
    get_display() https://phpgrid.com/documentation/get_display/ Sat, 14 Jan 2012 19:35:43 +0000 http://phpgrid.com/?p=1849 Parameters: $add_script_includeonce: true or false. Whether or not to include script header. Description: It returns the grid body with options to include script header. It is useful for MVC framework integration such as Joomla! and Drupal. Remark: The get_display() function should be called AFTER display() is called so that the grid body and header is saved […]

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

    ]]>
  • Parameters:
    • $add_script_includeonce: true or false. Whether or not to include script header.
  • Description:
    • It returns the grid body with options to include script header. It is useful for MVC framework integration such as Joomla! and Drupal.
  • Remark:
    • The get_display() function should be called AFTER display() is called so that the grid body and header is saved to an internal output buffer that can be later retrieved by get_display().
  • Example:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    $dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");
    $dg -> display(false);  // do not render display
    $grid = $dg -> get_display(false);  // do not include required javascript libraries until later with with display_script_includeonce method.

    // other page content goes here
    /* ........................... */

    $dg -> display_script_includeonce();
    echo $grid;

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

    ]]>
    1849
    display() https://phpgrid.com/documentation/display/ Tue, 14 Sep 2010 01:09:59 +0000 http://64.38.236.7/?p=350 Parameter(s): $render_content: Optional. True or false. Render content to screen, default value is set to true. Description: This is the method to call to display the datagrid. This is usually the last method to call. It automatically stores the output to output buffer first before rending the data grid. Remark: Unless used together wtih get_display(), […]

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

    ]]>
  • Parameter(s):
    • $render_content: Optional. True or false. Render content to screen, default value is set to true.
  • Description:
    • This is the method to call to display the datagrid. This is usually the last method to call. It automatically stores the output to output buffer first before rending the data grid.
  • Remark:
    • Unless used together wtih get_display(), it’s not necessary to supply a parameter value.
  • Example:
  • 1
    $dg -> display();

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

    ]]>
    350