Kendo.Mvc.UI.Fluent.TreeListBuilder

Defines the fluent API for configuring the Kendo UI TreeList

Methods

DataSource(System.Action<Kendo.Mvc.UI.Fluent.TreeListAjaxDataSourceBuilder<T>>)

Configure the DataSource of the component

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListAjaxDataSourceBuilder>

The action that configures the DataSource.

Example (ASPX)

@(Kendo().TreeList()
    .Name("TreeList")
    .DataSource(dataSource => dataSource
        .Read(read => read
            .Action("_PopulationUS", "TreeList")
        )
    )
)

DataSource(System.String)

Binds the TreeList to an existing DataSource instance.

Parameters

dataSourceId System.String

The name of the client DataSource instance.

Returns

Example (ASPX)

@(Html.Kendo().DataSource<ProductViewModel>()
    .Name("dataSource1")
    .Ajax(dataSource => dataSource
        .PageSize(10)
        .Read(read => read.Action("Products_Read", "DataSource"))
    )
)
@(Html.Kendo().TreeList<ProductViewModel>()
    .Name("TreeList")
    .DataSource("dataSource1")
)

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:

AutoBind(System.Boolean)

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.

Parameters

value System.Boolean

The value for AutoBind

Columns(System.Action<Kendo.Mvc.UI.Fluent.TreeListColumnFactory<T>>)

The configuration of the TreeList columns whcih represents an array of JavaScript objects or strings. JavaScript objects are interpreted as column configurations. Strings are interpreted as thefield to which the column is bound. The TreeList will create a column for each item of the array.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListColumnFactory>

The configurator for the columns setting.

Resizable(System.Boolean)

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

Parameters

value System.Boolean

The value for Resizable

Resizable

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

Reorderable(System.Boolean)

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

Parameters

value System.Boolean

The value for Reorderable

Reorderable

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

ColumnMenu(System.Action<Kendo.Mvc.UI.Fluent.TreeListColumnMenuSettingsBuilder<T>>)

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.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListColumnMenuSettingsBuilder>

The configurator for the columnmenu setting.

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.

ColumnMenu(System.Boolean)

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.

Parameters

enabled System.Boolean

Enables or disables the columnmenu option.

Editable(System.Action<Kendo.Mvc.UI.Fluent.TreeListEditableSettingsBuilder<T>>)

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.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListEditableSettingsBuilder>

The configurator for the editable setting.

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.

Editable(System.Boolean)

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.

Parameters

enabled System.Boolean

Enables or disables the editable option.

Excel(System.Action<Kendo.Mvc.UI.Fluent.TreeListExcelSettingsBuilder<T>>)

Configures the Excel export settings of the TreeList.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListExcelSettingsBuilder>

The configurator for the excel setting.

Filterable(System.Action<Kendo.Mvc.UI.Fluent.TreeListFilterableSettingsBuilder<T>>)

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.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListFilterableSettingsBuilder>

The configurator for the filterable setting.

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.

Filterable(System.Boolean)

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.

Parameters

enabled System.Boolean

Enables or disables the filterable option.

Height(System.Double)

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

Parameters

value System.Double

The value for Height

Messages(System.Action<Kendo.Mvc.UI.Fluent.TreeListMessagesSettingsBuilder<T>>)

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

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListMessagesSettingsBuilder>

The configurator for the messages setting.

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.

Parameters

value System.Boolean

The value for Navigatable

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.

Pageable(System.Action<Kendo.Mvc.UI.Fluent.TreeListPageableSettingsBuilder<T>>)

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.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListPageableSettingsBuilder>

The configurator for the pageable setting.

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.

Pageable(System.Boolean)

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.

Parameters

enabled System.Boolean

Enables or disables the pageable option.

Pdf(System.Action<Kendo.Mvc.UI.Fluent.TreeListPdfSettingsBuilder<T>>)

Configures the PDF export settings of the TreeList.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListPdfSettingsBuilder>

The configurator for the pdf setting.

Scrollable(System.Boolean)

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.

Parameters

value System.Boolean

The value for Scrollable

Sortable(System.Action<Kendo.Mvc.UI.Fluent.TreeListSortableSettingsBuilder<T>>)

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.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListSortableSettingsBuilder>

The configurator for the sortable setting.

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.

Sortable(System.Boolean)

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.

Parameters

enabled System.Boolean

Enables or disables the sortable option.

Toolbar(System.Action<Kendo.Mvc.UI.Fluent.TreeListToolbarFactory<T>>)

If a String value is assigned to the toolbar configuration option, it will be treated as a single string template for the whole TreeList toolbar and the string value will be passed as an argument to a kendo.template() function.; If a Function value is assigned (it may be a kendo.template() function call or a generic function reference), then the return value of the function will be used to render the contents of the TreeList toolbar. or If an Array value is assigned, it will be treated as the list of commands which are displayed in the TreeList toolbar. Commands can be custom or built-in. The supported built-in commands are:create - Adds an empty data item to the treelist.excel - Exports the TreeList data in MS Excel format.pdf - Exports the TreeList data in PDF format..

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListToolbarFactory>

The configurator for the toolbar setting.

Selectable(System.Action<Kendo.Mvc.UI.Fluent.TreeListSelectableSettingsBuilder<T>>)

Specifies whether TreeList selection is allowed. By default selection is disabled

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListSelectableSettingsBuilder>

The configurator for the selectable setting.

Selectable(System.Boolean)

Specifies whether TreeList selection is allowed. By default selection is disabled

Parameters

enabled System.Boolean

Enables or disables the selectable option.

Events(System.Action<Kendo.Mvc.UI.Fluent.TreeListEventBuilder>)

Configures the client-side events.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.TreeListEventBuilder>

The client events action.

Example (ASPX)

@(Html.Kendo().TreeList()
    .Name("TreeList")
    .Events(events => events
        .BeforeEdit("onBeforeEdit")
    )
)
In this article
Not finding the help you need?