Change title Archives | phpGrid - PHP Datagrid Create PHP grids in minutes, not hours. Tue, 03 Dec 2024 18:23:47 +0000 en-US hourly 1 CodeProjecthttps://wordpress.org/?v=7.0.3 129966043 Descriptive Column Header https://phpgrid.com/example/example-descriptive-column-headers/ Thu, 16 Sep 2010 00:09:29 +0000 http://64.38.236.7/?p=492 By default phpGrid pulls out the data field name defined in database as the header for each column. You can simply change the title using method set_col_title(). 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"); // change column titles $dg […]

The post Descriptive Column Header appeared first on phpGrid - PHP Datagrid.

]]>
By default phpGrid pulls out the data field name defined in database as the header for each column. You can simply change the title using method set_col_title().

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");

// 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.");

$dg -> display();

See Live Example!

The post Descriptive Column Header appeared first on phpGrid - PHP Datagrid.

]]>
492