\Kendo\UI\TreeListColumn

A PHP class representing the column setting of TreeListColumns.

Methods

attributes

HTML attributes of the table cell (

) rendered for the column.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value ``

addCommandItem

Adds one or more TreeListColumnCommandItem to the TreeListColumn.

Returns

\Kendo\UI\TreeListColumn

Parameters

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

Example - using \Kendo\UI\TreeListColumnCommandItem

<?php
$column = new \Kendo\UI\TreeListColumn();
$commandItem = new \Kendo\UI\TreeListColumnCommandItem();
$className = 'value';
$commandItem->className($className);
$column->addCommandItem($commandItem);
?>

Example - using array

<?php
$column = new \Kendo\UI\TreeListColumn();
$className = 'value';
$column->addCommandItem(array('className' => $className));
?>

Example - adding more than one TreeListColumnCommandItem

<?php
$column = new \Kendo\UI\TreeListColumn();
$first  = new \Kendo\UI\TreeListColumnCommandItem();
$second = new \Kendo\UI\TreeListColumnCommandItem();
$column->addCommandItem($first, $second);
?>

editor

Provides a way to specify a custom editing UI for the column. Use the container parameter to create the editing UI.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->editor(new \Kendo\JavaScriptFunction('function() { }'));
?>

encoded

If set to true the column value will be HTML-encoded before it is displayed. If set to false the column value will be displayed as is. By default the column value is HTML-encoded.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value boolean

Example

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

expandable

If set to true the column will show the icons that are used for expanding and collapsing child rows. By default, the first column of the TreeList is expandable.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value boolean

Example

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->expandable(true);
?>

field

The field to which the column is bound. The value of this field is displayed by the column during data binding.The field name should be a valid Javascript identifier and should contain no spaces, no special characters, and the first character should be a letter.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value string

Example

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->field('value');
?>

filterable

If set to true a filter menu will be displayed for this column when filtering is enabled. If set to false the filter menu will not be displayed. By default a filter menu is displayed for all columns when filtering is enabled via the filterable option.Can be set to a JavaScript object which represents the filter menu configuration.

Returns

\Kendo\UI\TreeListColumn

Parameters

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

Example - using boolean

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->filterable(true);
?>

Example - using \Kendo\UI\TreeListColumnFilterable

<?php
$column = new \Kendo\UI\TreeListColumn();
$filterable = new \Kendo\UI\TreeListColumnFilterable();
$ui = 'value';
$filterable->ui($ui);
$column->filterable($filterable);
?>

Example - using array

<?php
$column = new \Kendo\UI\TreeListColumn();
$ui = 'value';
$column->filterable(array('ui' => $ui));
?>

footerTemplate

The template which renders the footer table cell for the column.The fields which can be used in the template are: average - the value of the "average" aggregate (if specified); count - the value of the "count" aggregate (if specified); max - the value of the "max" aggregate (if specified); min - the value of the "min" aggregate (if specified); sum - the value of the "sum" aggregate (if specified) or data - provides access to all available aggregates, e.g. data.fieldName1.sum or data.fieldName2.average.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->footerTemplate('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->footerTemplate(new \Kendo\JavaScriptFunction('function() { }'));
?>

format

The format that is applied to the value before it is displayed. Takes the form "{0:format}" where "format" is a standard number format,custom number format, standard date format or a custom date format.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value string

Example

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->format('value');
?>

headerAttributes

HTML attributes of the table header cell (

) rendered for the column.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value ``

headerTemplate

The template which renders the column header content. By default the value of the title column option is displayed in the column header cell.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->headerTemplate('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->headerTemplate(new \Kendo\JavaScriptFunction('function() { }'));
?>

hidden

If set to true the column will not be displayed in the treelist. By default all columns are displayed.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value boolean

Example

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->hidden(true);
?>

lockable

If set to false the column will remain in the side of the treelist into which its own locked configuration placed it.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value boolean

Example

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->lockable(true);
?>

locked

If set to true the column will be displayed as locked (frozen) in the treelist. Also see the information about Frozen Columns in the Grid Appearance article.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value boolean

Example

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->locked(true);
?>

If set to true the column will be visible in the grid column menu. By default the column menu includes all data-bound columns (ones that have their field set).

Returns

\Kendo\UI\TreeListColumn

Parameters

$value boolean

Example

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->menu(true);
?>

minScreenWidth

The pixel screen width below which the column will be hidden. The setting takes precedence over the hidden setting, so the two should not be used at the same time.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value float

Example

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->minScreenWidth(1);
?>

sortable

If set to true the user can click the column header and sort the treelist by the column field when sorting is enabled. If set to false sorting will be disabled for this column. By default all columns are sortable if sorting is enabled via the sortable option.

Returns

\Kendo\UI\TreeListColumn

Parameters

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

Example - using boolean

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->sortable(true);
?>

Example - using \Kendo\UI\TreeListColumnSortable

<?php
$column = new \Kendo\UI\TreeListColumn();
$sortable = new \Kendo\UI\TreeListColumnSortable();
$compare = new \Kendo\JavaScriptFunction('function() { }');
$sortable->compare($compare);
$column->sortable($sortable);
?>

Example - using array

<?php
$column = new \Kendo\UI\TreeListColumn();
$compare = new \Kendo\JavaScriptFunction('function() { }');
$column->sortable(array('compare' => $compare));
?>

template

The template which renders the column content. The treelist renders table rows (

) which represent the data source items. Each table row consists of table cells () which represent the treelist columns. By default the HTML-encoded value of the field is displayed in the column.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->template('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->template(new \Kendo\JavaScriptFunction('function() { }'));
?>

title

The text that is displayed in the column header cell. If not set the field is used.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value string

Example

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->title('value');
?>

width

The width of the column. Numeric values are treated as pixels. For more important information, please refer to Column Widths.

Returns

\Kendo\UI\TreeListColumn

Parameters

$value string |float

Example - using string

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->width('value');
?>

Example - using float

<?php
$column = new \Kendo\UI\TreeListColumn();
$column->width(1);
?>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy