KoolTreeGrid - Great PHP TreeGridFullVersion 1.0.0.0 released on 05/22/2014
Data Types - KoolTreeGrid using array data
Description & Sample code
To use an table array as data for KoolTreeGrid, you must provide an id field and parent field for each row which is used to construct the tree relation between rows.
A meta field is optional that will provide options like row expanding or not, displaying type for each cell, etc.
For example:
A meta field is optional that will provide options like row expanding or not, displaying type for each cell, etc.
For example:
$arr = array( array('id' => '1', 'parent' => '' , 'type' => 'Captain', 'level' => '1'), array('id' => '2', 'parent' => '1', 'type' => 'Crew member', 'level' => '2'), array('id' => '3', 'parent' => '2', 'type' => 'Apprentice', 'level' => '3'), ); $treeGrid = KoolTreeGrid::newTreeGrid(array( 'ArrayData' => $arr, 'idField' => 'id', 'parentField' => 'parent', 'columns' => array( array( 'field' => 'type', ), array( 'field' => 'level', ), ), ));