Column Property

You can now directly manipulate individual column properties without using helper set_col_* functions such as set_col_format() and set_col_readonly() .  This is suitable for users who are already familiar with jqGrid colMdel API (http://www.trirand.com/jqgridwiki/doku.php?id=wiki:colmodel_options).

The new column property method does not replace existing helper functions. It should be used beside by side with the existing set_col_* helper functions.

1
2
3
4
5
6
7
8
$dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");
$dg -> set_row_color('yellow', 'blue', 'lightgray');
$dg -> set_col_property("orderNumber", array("name"=>;"Order Number", "width"=>;40));
// display only time
$dg -> set_col_property("orderDate",
                        array("formatter"=>;"date",
                              "formatoptions"=>;array("srcformat"=>;"ISO8601Short","newformat"=>;"g:i A"));
$dg -> display();

See Live Example!