\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 widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

Returns

\Kendo\UI\TreeList

Parameters

$value boolean

Example

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

cancel

Fired when the user clicks the "cancel" button (in inline or popup editing mode) or closes the popup window.The event handler function context (available via 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) { }'));
?>

change

Fired when the user selects a table row or cell in the treelist.The event handler function context (available via 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

Fired when an item is about to be collapsed.The event handler function context (available via 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

Fired when the user hides a column.The event handler function context (available via 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

Fired when the user lock a column.The event handler function context (available via 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 will display 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, filter and sort (if filtering and sorting are enabled). By default the column menu is not enabled.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

Fired when the column menu is initialized.The event handler function context (available via 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) { }'));
?>

columnReorder

Fired when the user changes the order of a column.The event handler function context (available via 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

Fired when the user resizes a column.The event handler function context (available via 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

Fired when the user shows a column.The event handler function context (available via 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

Fired when the user unlock a column.The event handler function context (available via 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

Fired before the widget binds to its data source.The event handler function context (available via 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

Fired when the widget is bound to data from its data source.The event handler function context (available via 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

Fired while the user drags and item. This event is triggered on every mouse move.The event handler function context (available via the this keyword) will be set to the widget instance.Available in builds 2015.3.1014 and later. 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

Fired when the user has finished dragging an item and the model has been updated.The event handler function context (available via the this keyword) will be set to the widget instance.Available in builds 2015.3.1014 and later. 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

Fired when the user attempts to drag an item. If prevented, the item is not allowed to move.The event handler function context (available via the this keyword) will be set to the widget instance.Available in builds 2015.3.1014 and later. 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

Fired when the user drops an item. If prevented, the source row will not be moved.The event handler function context (available via the this keyword) will be set to the widget instance.Available in builds 2015.3.1014 and later. 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

Fired when the user edits or creates a data item.The event handler function context (available via 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 would be able to edit the data to which the treelist is bound. By default editing is disabled.Can be set to a string ("inline" or "popup") to specify the editing mode. The default editing mode is "inline".Can be set to a JavaScript object which represents the editing configuration.

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 Kendo UI TreeList Excel export settings.

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

Fired 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

Fired when an item is about to be expanded.The event handler function context (available via 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

Fired when the treelist filter menu is initialized.The event handler function context (available via 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) { }'));
?>

filterable

If set to true the user can filter the data source using the treelist filter menu. Filtering is disabled by default.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));
?>

pdf

Configures the Kendo UI TreeList PDF export settings.

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

Fired 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

Fired when the user clicks the "destroy" command button.The event handler function context (available via 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 could 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 allows users to 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

Fired when a data item is saved.The event handler function context (available via 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) { }'));
?>

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 would be able to select treelist rows. By default selection is disabled.Can also be set to the following string values:

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 could 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();
$name = 'value';
$toolbarItem->name($name);
$treeList->addToolbarItem($toolbarItem);
?>

Example - using array

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

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);
?>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy