getGridOption($key) to obtain the desired option
where $key is a name listed in the table below
and
setGridOption(array $aoptions) to set a new option(s)
where
$aoptions is array where multiple optins can be set.
The method can be called several times in order to set or overwrite existing option(s).
Example: If we want to change the width and the height of the grid we can write the code like this
<?php ... // Create the jqTreeGrid instance $tree = new jqTreeGrid($conn); ... $tree->setGridOptions(array("width"=>500,"height"=>350)); ... $tree->renderTree(...); ?>
The same code is equivalent
<?php ... // Create the jqTreeGrid instance $tree = new jqTreeGrid($conn); ... $tree->setGridOptions(array("width"=>500)); $tree->setGridOptions(array("height"=>350)); ... $tree->renderTree(...); ?>
Again with Grid Options available in the grid we can use the following one
Type |
Name |
Description |
Default |
---|---|---|---|
boolean |
ExpandColClick |
boolean when true, the tree is expanded and/or collapsed when we click on the text of the expanded column, not only on the image |
|
string |
ExpandColumn |
Indicates which column (name from colModel) should be used to expand the tree grid. If not set the first one is used. |
null |
string |
treedatatype |
Determines the initial datatype (see datatype option). Usually this should not be changed. During the reading process this option is equal to the datatype option |
null |
bollean |
treeGrid |
Enables tree grid. Usualy this option shuld not be set. It is set automatically when the new instance of a class is created. |
false |
string |
treeGridModel |
Deteremines the method used for the treeGrid. Can be nested or adjacency. Change this option with setTreeModel method. |
nested |
string |
treeGridModel |
Deteremines the method used for the treeGrid. Can be nested or adjacency. Change this option with setTreeModel method. |
nested |
array |
treeIcons |
This array set the icons used in the tree. The icons should be a valid icons from UI theme roller images. The default values are: array("plus"=>'ui-icon-triangle-1-e',"minus"=>'ui-icon-triangle-1-s',"leaf"=>'ui-icon-radio-off'} |
nested |
array |
treeReader |
extends the colModel defined in the basic grid. The fields described here are added to end of the colModel array. This means that the data returned from the server should have values for these fields. Usually this option should not be set. It is set automatically from the class. |
|
integer |
tree_root_level |
Determines the level where the root element begins when treeGrid is enabled |
0 |