Yii 1.1: treetable

Tree Table
10 followers

The treeTable plugin allows you to display a tree in a table, i.e. a directory structure or a nested list. Each branch in this tree can be collapsed and expanded, just like in a file explorer in most modern operating systems.

Documentation

Requirements

  • Yii 1.0 or above

Installation

  • Extract the release file under protected/extensions

Usage

See the following code example:

$this->widget('ext.treetable.JTreeTable',array(
    'id'=>'treeTable',
    'primaryColumn'=>'id',
    'parentColumn'=>'parent_id',
    'columns'=>array(
        'id'=>array(
            'label'=>'Id',
            'headerHtmlOptions'=>array('width'=>80),
            'htmlOptions'=>array('align'=>'center'),
        ),
        'name'=>'Name',
    ),
    'items'=>array(
        array('id'=>1,'parent_id'=>0,'name'=>'test 1'),
        array('id'=>2,'parent_id'=>1,'name'=>'test 1\'s children 1'),
    ),
    'options'=>array(
        'initialState'=>'expanded',
    ),
));

Change Log

April 30, 2010

  • Initial release.

Total 5 comments

#18055 report it
Bianchi at 2014/09/02 10:47am
Try that

Try that

http://www.yiiframework.com/extension/silcom-tree-grid-view/

#11836 report it
v_bogdan at 2013/02/06 06:16pm
how can i add control buttons

how can i add control buttons to delete, view posts in table?

#7534 report it
pligor at 2012/03/28 08:10am
please update this extension

The display of the options is depended from the order of the ids inside the database. please fix that!

Also could you please correct the usage of tables inside the view? use divs instead. Much more flexible IMHO

#2157 report it
sebacibertico at 2010/11/19 10:22am
Buena extensión

Muy buena extensión, es muy útil para crear árboles binarios.

#505 report it
webzio at 2010/05/11 09:31am
i cant understand

Nice treetable. Do yourself. :}

Leave a comment

Please to leave your comment.

Create extension