\Kendo\UI\TreeList

A PHP wrapper for Kendo UI TreeList.

Inherits from \Kendo\UI\Widget.

Usage

To use TreeList in a PHP page instantiate a new instance, configure it via the available configuration methods and output it by echo-ing the result of the render method.

Using Kendo TreeList

<?php
// Create a new instance of TreeList and specify its id
$treeList = new \Kendo\UI\TreeList('TreeList');

// Configure it
$treeList->autoBind(true)

// Output it

echo $treeList->render();
?>

Methods

autoBind

If set to false, the TreeList will not bind to the specified DataSource during initialization. In this case, data binding will occur when the change event of the DataSource fires. By default, the TreeList will bind to the DataSource that is specified in the configuration.

Returns

\Kendo\UI\TreeList

Parameters

$value boolean

Example

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->autoBind(true);
?>

beforeEdit

Fires when the user tries to edit or creates a data item before the editor is created. Can be used for preventing the editing depending on custom logic. The event handler function context (available through the this keyword) will be set to the widget instance. The event will be fired only when the TreeList is editable. For additional information check the beforeEdit event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->beforeEdit('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onBeforeEdit(e) {
        // handle the beforeEdit event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->beforeEdit('onBeforeEdit');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->beforeEdit(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

cancel

Fires when the user clicks the Cancel button (in inline or popup edit mode) or closes the popup window. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the cancel event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->cancel('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onCancel(e) {
        // handle the cancel event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->cancel('onCancel');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->cancel(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

cellClose

Fires when the incell edit mode is used and the cell will be closed. The event is triggered after saving or canceling the changes but before the cell is closed. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the cellClose event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->cellClose('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onCellClose(e) {
        // handle the cellClose event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->cellClose('onCellClose');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->cellClose(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

change

Fires when the user selects a table row or cell in the TreeList. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the change event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->change('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onChange(e) {
        // handle the change event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->change('onChange');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

collapse

Fires when an item is about to be collapsed. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the collapse event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->collapse('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onCollapse(e) {
        // handle the collapse event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->collapse('onCollapse');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->collapse(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnHide

Fires when the user hides a column. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the columnHide event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnHide('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnHide(e) {
        // handle the columnHide event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnHide('onColumnHide');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnHide(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnLock

Fires when the user lock a column. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the columnLock event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnLock('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnLock(e) {
        // handle the columnLock event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnLock('onColumnLock');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnLock(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnMenu

If set to true, the TreeList displays the column menu when the user clicks the Chevron icon in the column headers. The column menu allows the user to show and hide columns, and, if filtering and sorting are enabled, filter and sort the data. By default, the column menu is disabled. Can be set to a JavaScript object which represents the column menu configuration.

Returns

\Kendo\UI\TreeList

Parameters

$value boolean|\Kendo\UI\TreeListColumnMenu|array

Example - using boolean

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnMenu(true);
?>

Example - using \Kendo\UI\TreeListColumnMenu

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$columnMenu = new \Kendo\UI\TreeListColumnMenu();
$columns = true;
$columnMenu->columns($columns);
$treeList->columnMenu($columnMenu);
?>

Example - using array

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$columns = true;
$treeList->columnMenu(array('columns' => $columns));
?>

columnMenuInit

Fires when the column menu is initialized. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the columnMenuInit event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnMenuInit('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnMenuInit(e) {
        // handle the columnMenuInit event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnMenuInit('onColumnMenuInit');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnMenuInit(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnMenuOpen

Fires when the column menu is opened. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the columnMenuOpen event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnMenuOpen('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnMenuOpen(e) {
        // handle the columnMenuOpen event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnMenuOpen('onColumnMenuOpen');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnMenuOpen(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnReorder

Fires when the user changes the order of a column. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the columnReorder event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnReorder('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnReorder(e) {
        // handle the columnReorder event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnReorder('onColumnReorder');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnReorder(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnResize

Fires when the user resizes a column. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the columnResize event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnResize('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnResize(e) {
        // handle the columnResize event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnResize('onColumnResize');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnResize(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnShow

Fires when the user shows a column. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the columnShow event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnShow('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnShow(e) {
        // handle the columnShow event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnShow('onColumnShow');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnShow(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnUnlock

Fires when the user unlock a column. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the columnUnlock event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnUnlock('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnUnlock(e) {
        // handle the columnUnlock event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnUnlock('onColumnUnlock');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->columnUnlock(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

addColumn

Adds one or more TreeListColumn to the TreeList.

Returns

\Kendo\UI\TreeList

Parameters

$value[, $value2, ...] \Kendo\UI\TreeListColumn|array

Example - using \Kendo\UI\TreeListColumn

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$column = new \Kendo\UI\TreeListColumn();
$encoded = true;
$column->encoded($encoded);
$treeList->addColumn($column);
?>

Example - using array

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$encoded = true;
$treeList->addColumn(array('encoded' => $encoded));
?>

Example - adding more than one TreeListColumn

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$first  = new \Kendo\UI\TreeListColumn();
$second = new \Kendo\UI\TreeListColumn();
$treeList->addColumn($first, $second);
?>

dataBinding

Fires before the widget binds to its data source. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the dataBinding event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dataBinding('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDataBinding(e) {
        // handle the dataBinding event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dataBinding('onDataBinding');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dataBinding(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dataBound

Fires when the widget is bound to data from its data source. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the dataBound event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dataBound('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDataBound(e) {
        // handle the dataBound event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dataBound('onDataBound');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dataBound(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dataSource

Sets the data source of the widget.

Returns

\Kendo\UI\TreeList

Parameters

$value \Kendo\Data\DataSource|array

Example - using \Kendo\Data\DataSource

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$dataSource = new \Kendo\Data\DataSource();
$treeList->dataSource($dataSource);
?>

Example - using array

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$schema = new \Kendo\Data\DataSourceSchema();
$treeList->dataSource(array('schema' => $schema));
?>

drag

(Available as of the 2015.3.1014 release) Fires while the user is dragging and item. This event is triggered on every mouse move. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the drag event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->drag('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDrag(e) {
        // handle the drag event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->drag('onDrag');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->drag(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dragend

(Available as of the 2015.3.1014 release) Fires when the user finishes dragging an item and the model was updated. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the dragend event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dragend('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDragend(e) {
        // handle the dragend event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dragend('onDragend');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dragend(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dragstart

(Available as of the 2015.3.1014 release) Fires when the user attempts to drag an item. If prevented, the item is not allowed to move. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the dragstart event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dragstart('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDragstart(e) {
        // handle the dragstart event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dragstart('onDragstart');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->dragstart(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

drop

(Available as of the 2015.3.1014 release) Fires when the user drops an item. If prevented, the source row will not be moved. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the drop event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->drop('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDrop(e) {
        // handle the drop event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->drop('onDrop');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->drop(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

edit

Fires when the user edits or creates a data item. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the edit event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->edit('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onEdit(e) {
        // handle the edit event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->edit('onEdit');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->edit(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

editable

If set to true, the user will be able to edit the data to which the TreeList is bound. By default, editing is disabled. can be set to a JavaScript object (which represents the editing configuration) or to a string (which specifies the edit mode).The supported string values are: (Default) inline; popup or incell.

Returns

\Kendo\UI\TreeList

Parameters

$value boolean|\Kendo\UI\TreeListEditable|array

Example - using boolean

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->editable(true);
?>

Example - using \Kendo\UI\TreeListEditable

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$editable = new \Kendo\UI\TreeListEditable();
$mode = 'value';
$editable->mode($mode);
$treeList->editable($editable);
?>

Example - using array

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$mode = 'value';
$treeList->editable(array('mode' => $mode));
?>

excel

Configures the Excel export settings of the TreeList.

Returns

\Kendo\UI\TreeList

Parameters

$value \Kendo\UI\TreeListExcel|array

Example - using \Kendo\UI\TreeListExcel

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$excel = new \Kendo\UI\TreeListExcel();
$fileName = 'value';
$excel->fileName($fileName);
$treeList->excel($excel);
?>

Example - using array

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$fileName = 'value';
$treeList->excel(array('fileName' => $fileName));
?>

excelExport

Fires when the user clicks the Export to Excel toolbar button. For additional information check the excelExport event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->excelExport('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onExcelExport(e) {
        // handle the excelExport event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->excelExport('onExcelExport');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->excelExport(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

expand

Fires when an item is about to be expanded. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the expand event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->expand('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onExpand(e) {
        // handle the expand event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->expand('onExpand');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->expand(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

filterMenuInit

Fires when the TreeList filter menu is initialized. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the filterMenuInit event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->filterMenuInit('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onFilterMenuInit(e) {
        // handle the filterMenuInit event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->filterMenuInit('onFilterMenuInit');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->filterMenuInit(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

filterMenuOpen

Fires when the TreeList filter menu is opened. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the filterMenuOpen event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->filterMenuOpen('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onFilterMenuOpen(e) {
        // handle the filterMenuOpen event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->filterMenuOpen('onFilterMenuOpen');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->filterMenuOpen(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

filterable

If set to true, the user can filter the data source by using the TreeList filter menu. By default, filtering is disabled. Can be set to a JavaScript object which represents the filter menu configuration.

Returns

\Kendo\UI\TreeList

Parameters

$value boolean|\Kendo\UI\TreeListFilterable|array

Example - using boolean

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->filterable(true);
?>

Example - using \Kendo\UI\TreeListFilterable

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$filterable = new \Kendo\UI\TreeListFilterable();
$extra = true;
$filterable->extra($extra);
$treeList->filterable($filterable);
?>

Example - using array

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$extra = true;
$treeList->filterable(array('extra' => $extra));
?>

height

The height of the TreeList. Numeric values are treated as pixels.

Returns

\Kendo\UI\TreeList

Parameters

$value float|string

Example - using float

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->height(1);
?>

Example - using string

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->height('value');
?>

messages

Defines the text of the command buttons that are shown within the TreeList. Used primarily for localization.

Returns

\Kendo\UI\TreeList

Parameters

$value \Kendo\UI\TreeListMessages|array

Example - using \Kendo\UI\TreeListMessages

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$messages = new \Kendo\UI\TreeListMessages();
$loading = 'value';
$messages->loading($loading);
$treeList->messages($messages);
?>

Example - using array

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$loading = 'value';
$treeList->messages(array('loading' => $loading));
?>

If set to true, the user can navigate the widget with the keyboard. By default, keyboard navigation is disabled. For a runnable example, refer to the demo on keyboard navigation in the TreeList.

Returns

\Kendo\UI\TreeList

Parameters

$value boolean

Example

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->navigatable(true);
?>

pageable

If set to true, the TreeList displays a pager. By default, paging is disabled. Only client-side paging is supported which means that all data items are expected to be available when the TreeList is initialized. Can be set to a JavaScript object which represents the pager configuration.

Returns

\Kendo\UI\TreeList

Parameters

$value boolean|\Kendo\UI\TreeListPageable|array

Example - using boolean

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->pageable(true);
?>

Example - using \Kendo\UI\TreeListPageable

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$pageable = new \Kendo\UI\TreeListPageable();
$alwaysVisible = true;
$pageable->alwaysVisible($alwaysVisible);
$treeList->pageable($pageable);
?>

Example - using array

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$alwaysVisible = true;
$treeList->pageable(array('alwaysVisible' => $alwaysVisible));
?>

pdf

Configures the PDF export settings of the TreeList.

Returns

\Kendo\UI\TreeList

Parameters

$value \Kendo\UI\TreeListPdf|array

Example - using \Kendo\UI\TreeListPdf

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$pdf = new \Kendo\UI\TreeListPdf();
$author = 'value';
$pdf->author($author);
$treeList->pdf($pdf);
?>

Example - using array

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$author = 'value';
$treeList->pdf(array('author' => $author));
?>

pdfExport

Fires when the user clicks the Export to PDF toolbar button. For additional information check the pdfExport event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->pdfExport('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onPdfExport(e) {
        // handle the pdfExport event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->pdfExport('onPdfExport');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->pdfExport(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

remove

Fires when the user clicks the Destroy command button. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the remove event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->remove('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onRemove(e) {
        // handle the remove event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->remove('onRemove');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->remove(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

reorderable

If set to true, the user can reorder the columns by dragging their header cells. By default, reordering is disabled.

Returns

\Kendo\UI\TreeList

Parameters

$value boolean

Example

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->reorderable(true);
?>

resizable

If set to true, the user can resize columns by dragging their header borders. By default, resizing is disabled.

Returns

\Kendo\UI\TreeList

Parameters

$value boolean

Example

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->resizable(true);
?>

save

Fires when a data item is saved. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the save event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->save('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onSave(e) {
        // handle the save event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->save('onSave');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->save(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

saveChanges

Fires when the user clicks the Save command button. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the saveChanges event documentation.

Returns

\Kendo\UI\TreeList

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->saveChanges('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onSaveChanges(e) {
        // handle the saveChanges event.
    }
</script>
<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->saveChanges('onSaveChanges');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->saveChanges(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

scrollable

If set to true, the TreeList will display a scrollbar when the total row height or width exceeds the TreeList height or width. By default, scrolling is enabled. Scrolling renders separate tables for the header and data area. For accessibility-conscious applications, disable scrolling.

Returns

\Kendo\UI\TreeList

Parameters

$value boolean|

Example - using boolean

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->scrollable(true);
?>

selectable

If set to true, the user will be able to select TreeList rows. By default, selection is disabled.Can also be set to the following string values: row - The user can select a single row.; cell - The user can select a single cell.; multiple, row - The user can select multiple rows. or multiple, cell - The user can select multiple cells..

Returns

\Kendo\UI\TreeList

Parameters

$value boolean|string

Example - using boolean

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->selectable(true);
?>

Example - using string

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->selectable('value');
?>

sortable

If set to true, the user is able to sort the TreeList by clicking the column header cells. By default, sorting is disabled. Can be set to a JavaScript object which represents the sorting configuration.

Returns

\Kendo\UI\TreeList

Parameters

$value boolean|\Kendo\UI\TreeListSortable|array

Example - using boolean

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$treeList->sortable(true);
?>

Example - using \Kendo\UI\TreeListSortable

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$sortable = new \Kendo\UI\TreeListSortable();
$allowUnsort = true;
$sortable->allowUnsort($allowUnsort);
$treeList->sortable($sortable);
?>

Example - using array

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$allowUnsort = true;
$treeList->sortable(array('allowUnsort' => $allowUnsort));
?>

addToolbarItem

Adds one or more TreeListToolbarItem to the TreeList.

Returns

\Kendo\UI\TreeList

Parameters

$value[, $value2, ...] \Kendo\UI\TreeListToolbarItem|array

Example - using \Kendo\UI\TreeListToolbarItem

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$toolbarItem = new \Kendo\UI\TreeListToolbarItem();
$imageClass = 'value';
$toolbarItem->imageClass($imageClass);
$treeList->addToolbarItem($toolbarItem);
?>

Example - using array

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$imageClass = 'value';
$treeList->addToolbarItem(array('imageClass' => $imageClass));
?>

Example - adding more than one TreeListToolbarItem

<?php
$treeList = new \Kendo\UI\TreeList('TreeList');
$first  = new \Kendo\UI\TreeListToolbarItem();
$second = new \Kendo\UI\TreeListToolbarItem();
$treeList->addToolbarItem($first, $second);
?>
In this article
Not finding the help you need?