TreeListBuilder
Methods
AltRowTemplate(System.String)
The template which renders the alternating table rows. By default the treelist renders a table row (<tr>) for every data source item.
Parameters
value - System.String
The value that configures the altrowtemplate.
AltRowTemplateId(System.String)
The template which renders the alternating table rows. By default the treelist renders a table row (<tr>) for every data source item.
Parameters
value - System.String
The value that configures the altrowtemplate.
AltRowTemplateView(System.Web.Mvc.MvcHtmlString)
The template which renders the alternating table rows. By default the treelist renders a table row (<tr>) for every data source item.
Parameters
value - System.Web.Mvc.MvcHtmlString
The value that configures the altrowtemplate.
AltRowTemplateHandler(System.String)
The template which renders the alternating table rows. By default the treelist renders a table row (<tr>) for every data source item.
Parameters
value - System.String
The value that configures the altrowtemplate.
AltRowTemplate(Kendo.Mvc.UI.TemplateBuilder)
The template which renders the alternating table rows. By default the treelist renders a table row (<tr>) for every data source item.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the altrowtemplate.
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 that configures the autobind.
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 that configures the resizable.
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 that configures the reorderable.
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.
ColumnMenu(System.Action)
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<TreeListColumnMenuSettingsBuilder>
The action that configures the columnmenu.
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.
Editable(System.Action)
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<TreeListEditableSettingsBuilder>
The action that configures the editable.
Excel(System.Action)
Configures the Excel export settings of the TreeList.
Parameters
configurator - System.Action<TreeListExcelSettingsBuilder>
The action that configures the excel.
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.
Filterable(System.Action)
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<TreeListFilterableSettingsBuilder>
The action that configures the filterable.
Height(System.Double)
The height of the TreeList. Numeric values are treated as pixels.
Parameters
value - System.Double
The value that configures the height.
Messages(System.Action)
Defines the text of the command buttons that are shown within the TreeList. Used primarily for localization.
Parameters
configurator - System.Action<TreeListMessagesSettingsBuilder>
The action that configures the messages.
Navigatable(System.Boolean)
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 that configures the navigatable.
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.
Pageable(System.Action)
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<TreeListPageableSettingsBuilder>
The action that configures the pageable.
Pdf(System.Action)
Configures the PDF export settings of the TreeList.
Parameters
configurator - System.Action<TreeListPdfSettingsBuilder>
The action that configures the pdf.
RowTemplate(System.String)
The template which renders rows. By default renders a table row (<tr>) for every data source item.
Parameters
value - System.String
The value that configures the rowtemplate.
RowTemplateId(System.String)
The template which renders rows. By default renders a table row (<tr>) for every data source item.
Parameters
value - System.String
The value that configures the rowtemplate.
RowTemplateView(System.Web.Mvc.MvcHtmlString)
The template which renders rows. By default renders a table row (<tr>) for every data source item.
Parameters
value - System.Web.Mvc.MvcHtmlString
The value that configures the rowtemplate.
RowTemplateHandler(System.String)
The template which renders rows. By default renders a table row (<tr>) for every data source item.
Parameters
value - System.String
The value that configures the rowtemplate.
RowTemplate(Kendo.Mvc.UI.TemplateBuilder)
The template which renders rows. By default renders a table row (<tr>) for every data source item.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the rowtemplate.
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 that configures the scrollable.
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.
Sortable(System.Action)
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<TreeListSortableSettingsBuilder>
The action that configures the sortable.
Toolbar(System.Action)
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.search - built-in search panel for the TreeList..
Parameters
configurator - System.Action<TreeListToolbarFactory>
The action that configures the toolbar.
Columns(System.Action)
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<TreeListColumnFactory>
The action that configures the columns.
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.
Selectable(System.Boolean)
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:
Parameters
value - System.Boolean
The value that configures the selectable.
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:
Selectable(System.Action)
Specifies whether TreeList selection is allowed. By default selection is disabled
Parameters
configurator - System.Action<TreeListSelectableSettingsBuilder>
The configurator for the selectable setting.
Search(System.Action)
Configures the Kendo UI TreeList search bar settings.
Parameters
configurator - System.Action<TreeListSearchSettingsBuilder>
The action that configures the search.
DataSource(System.Action)
Configure the DataSource of the component
Parameters
configurator - System.Action<TreeListAjaxDataSourceBuilder>
The action that configures the DataSource.
Example
@( Html.Kendo().TreeMap()
.Name("treeMap")
.DataSource(dataSource => dataSource
.Read(read => read
.Action("_PopulationUS", "TreeMap")
)
)
)
DataSource(System.String)
Parameters
dataSourceId - System.String
BindTo(System.Collections.Generic.IEnumerable)
Binds the grid to a list of objects
Parameters
dataSource - System.Collections.Generic.IEnumerable<T>
The data source.
Toolbar(System.String)
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.search - built-in search panel for the TreeList..
Parameters
template - System.String
The template for the toolbar.
Toolbar(Kendo.Mvc.UI.TemplateBuilder)
Parameters
template - TemplateBuilder<TModel>
ToolbarTemplateHandler(System.String)
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.search - built-in search panel for the TreeList..
Parameters
handler - System.String
ToolbarTemplateId(System.String)
Sets the id of the script element which contains the client-side toolbar template of the TreeList.
Parameters
template - System.String
The template for the toolbar.
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<TreeListEventBuilder>
The client events action.
Example
@( Html.Kendo().TreeList()
.Name("TreeList")
.Events(events => events
.DataBinding("onDataBinding")
)
)
ToComponent()
Returns the internal view component.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name of the component.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
ModelMetadata(System.Web.Mvc.ModelMetadata)
Uses the Metadata of the Model.
Parameters
modelMetadata - System.Web.Mvc.ModelMetadata
The metadata set for the Model
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
HtmlAttributes(System.Collections.Generic.IDictionary)
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
Render()
Renders the component.
Example
@(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
@( Html.Kendo().Grid(Model)
.Name("grid")
.DetailTemplate(product => {
)
Product Details:
<div>Product Name: @( product.ProductName )</div>
<div>Units In Stock: @( product.UnitsInStock )</div>
@(
})
.Render();
)
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.