caption Archives | phpGrid - PHP Datagrid Create PHP grids in minutes, not hours. Fri, 29 Nov 2024 23:50:32 +0000 en-US hourly 1 CodeProjecthttps://wordpress.org/?v=7.0.3 129966043 Datagrid Caption https://phpgrid.com/example/datagrid-caption/ Thu, 16 Sep 2010 00:16:04 +0000 http://64.38.236.7/?p=501 By default, phpGrid displays table name as the caption. You can change the datagrid caption using set_caption(). You can also hide the caption by using an empty string “” as the caption. 12345678910111213141516171819// 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", […]

The post Datagrid Caption appeared first on phpGrid - PHP Datagrid.

]]>
By default, phpGrid displays table name as the caption. You can change the datagrid caption using set_caption(). You can also hide the caption by using an empty string “” as the caption.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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");

// change column titles
$dg->set_col_title("orderNumber", "Order No.");
$dg->set_col_title("orderDate", "Order Date");
$dg->set_col_title("shippedDate", "Shipped Date");
$dg->set_col_title("customerNumber", "Customer No.");
 
// hide a column
$dg -> set_col_hidden("requiredDate");

// change default caption
$dg -> set_caption("Orders List");
 
$dg -> display();

See Live Example!

The post Datagrid Caption appeared first on phpGrid - PHP Datagrid.

]]>
501