KoolTreeGrid - Great PHP TreeGridKoolTreeGrid - Great PHP TreeGridFullVersion 1.0.0.0 released on 05/22/2014

Data Types - KoolTreeGrid using tree array

Description & Sample code

To use a tree array as data for KoolTreeGrid, for each node you could specify three keys and values:
'row' => array(..) : data row
'meta' => array(..) : row customization
'children' => array(array(..), array(..), ..., array(..)) : child rows of current row.
For example:
    $arr = array(
        'row' => array(
            'type' => 'Captain',
            'level' => '1',
        ),
        'children' => array(
            array(
                'row' => array(
                    'type' => 'Crew member',
                    'level' => '2',
                ),
                'meta' => array(
                    'rowEdit' => array(
                        'level' => true
                    ),
                ),
                'children' => array(
                    array(
                        'row' => array(
                            'type' => 'Apprentice',
                            'level' => '3',
                        ),
                    ),
                ),
            ),
        ),
    );
    
    $treeGrid = KoolTreeGrid::newTreeGrid(array(
        'id' => 'KoolTreeGrid1',
        'TreeArray' => $arr,
        'columns' => array(
            array(
                'field' => 'type',
            ),
            array(
                'field' => 'level',
            ),
        ),
    ));