TreeListBuilder<T>
Defines the fluent API for configuring the Kendo UI TreeList
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
T
Syntax:
public class TreeListBuilder<T> : WidgetBuilderBase<TreeList<T>, TreeListBuilder<T>>, IHtmlContent where T : class
Inheritance: objectHelperResultWidgetBuilderBase<TreeList<T>, TreeListBuilder<T>>TreeListBuilder<T>
Implements:
Inherited Members
Constructors
Initializes a new instance of the TreeListBuilder<T> class.
public TreeListBuilder(TreeList<T> component)
The TreeList component.
Methods
The template which renders the alternating table rows. By default the treelist renders a table row (<tr>) for every data source item.
public TreeListBuilder<T> AltRowTemplate(string value)
The value for AltRowTemplate
Returns:Returns the current TreeListBuilder<T> instance.
The template which renders the alternating table rows. By default the treelist renders a table row (<tr>) for every data source item.
public TreeListBuilder<T> AltRowTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the altrowtemplate.
Returns:Returns the current TreeListBuilder<T> instance.
The template which renders the alternating table rows. By default the treelist renders a table row (<tr>) for every data source item.
public TreeListBuilder<T> AltRowTemplateHandler(string templateHandler)
The handler that returs the template for AltRowTemplate
Returns:Returns the current TreeListBuilder<T> instance.
The template which renders the alternating table rows. By default the treelist renders a table row (<tr>) for every data source item.
public TreeListBuilder<T> AltRowTemplateId(string templateId)
The ID of the template element for AltRowTemplate
Returns:Returns the current TreeListBuilder<T> instance.
The template which renders the alternating table rows. By default the treelist renders a table row (<tr>) for every data source item.
public TreeListBuilder<T> AltRowTemplateView(IHtmlContent templateView)
The view that contains the template for AltRowTemplate
Returns:Returns the current TreeListBuilder<T> instance.
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.
public TreeListBuilder<T> AutoBind(bool value)
The value for AutoBind
Returns:Returns the current TreeListBuilder<T> instance.
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.
public TreeListBuilder<T> ColumnMenu()
Returns the current instance of 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.
public TreeListBuilder<T> ColumnMenu(Action<TreeListColumnMenuSettingsBuilder<T>> configurator)
The TreeListColumnMenuSettingsBuilder<T> for the columnmenu setting.
Returns:Returns the current instance of TreeListBuilder<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.
public TreeListBuilder<T> ColumnMenu(bool enabled)
Enables or disables the columnmenu option.
Returns:Returns the current instance of TreeListColumnMenuSettingsBuilder<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.
public TreeListBuilder<T> Columns(Action<TreeListColumnFactory<T>> configurator)
The TreeListColumnFactory<T> for the columns setting.
Returns:Returns the current instance of TreeListBuilder<T> .
Configure the DataSource of the component
public TreeListBuilder<T> DataSource(Action<TreeListAjaxDataSourceBuilder<T>> configurator)
The action that configures the DataSource.
Returns:Returns the current TreeListBuilder<T> instance.
Binds the TreeList to an existing DataSource instance.
public TreeListBuilder<T> DataSource(string dataSourceId)
The name of the client DataSource instance.
Returns: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.
public TreeListBuilder<T> Editable()
Returns the current instance of 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.
public TreeListBuilder<T> Editable(Action<TreeListEditableSettingsBuilder<T>> configurator)
The TreeListEditableSettingsBuilder<T> for the editable setting.
Returns:Returns the current instance of TreeListBuilder<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.
public TreeListBuilder<T> Editable(bool enabled)
Enables or disables the editable option.
Returns:Returns the current instance of TreeListEditableSettingsBuilder<T> .
Configures the client-side events.
public TreeListBuilder<T> Events(Action<TreeListEventBuilder> configurator)
The client events action.
Returns:Returns the current TreeListBuilder<T> instance.
Configures the Excel export settings of the TreeList.
public TreeListBuilder<T> Excel(Action<TreeListExcelSettingsBuilder<T>> configurator)
The TreeListExcelSettingsBuilder<T> for the excel setting.
Returns:Returns the current instance of TreeListBuilder<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.
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.
public TreeListBuilder<T> Filterable(Action<TreeListFilterableSettingsBuilder<T>> configurator)
The configurator for the filterable setting.
Returns:Returns the current TreeListBuilder<T> instance.
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.
public TreeListBuilder<T> Filterable(bool enabled)
Enables or disables the filterable option.
Returns:Returns the current TreeListBuilder<T> instance.
The height of the TreeList. Numeric values are treated as pixels.
public TreeListBuilder<T> Height(double value)
The value for Height
Returns:Returns the current TreeListBuilder<T> instance.
Defines the text of the command buttons that are shown within the TreeList. Used primarily for localization.
public TreeListBuilder<T> Messages(Action<TreeListMessagesSettingsBuilder<T>> configurator)
The TreeListMessagesSettingsBuilder<T> for the messages setting.
Returns:Returns the current instance of TreeListBuilder<T> .
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.
public TreeListBuilder<T> Navigatable()
Returns the current TreeListBuilder<T> instance.
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.
public TreeListBuilder<T> Navigatable(bool value)
The value for Navigatable
Returns:Returns the current TreeListBuilder<T> instance.
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.
public TreeListBuilder<T> Pageable()
Returns the current instance of TreeListBuilder<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.
public TreeListBuilder<T> Pageable(Action<TreeListPageableSettingsBuilder> configurator)
The configurator for the pageable setting.
Returns:Returns the current TreeListBuilder<T> instance.
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.
public TreeListBuilder<T> Pageable(bool enabled)
Enables or disables the pageable option.
Returns:Returns the current instance of TreeListBuilder<T> .
Configures the PDF export settings of the TreeList.
public TreeListBuilder<T> Pdf(Action<TreeListPdfSettingsBuilder<T>> configurator)
The TreeListPdfSettingsBuilder<T> for the pdf setting.
Returns:Returns the current instance of TreeListBuilder<T> .
If set to true, the user can reorder the columns by dragging their header cells. By default, reordering is disabled.
public TreeListBuilder<T> Reorderable()
Returns the current TreeListBuilder<T> instance.
If set to true, the user can reorder the columns by dragging their header cells. By default, reordering is disabled.
public TreeListBuilder<T> Reorderable(bool value)
The value for Reorderable
Returns:Returns the current TreeListBuilder<T> instance.
If set to true, the user can resize columns by dragging their header borders. By default, resizing is disabled.
If set to true, the user can resize columns by dragging their header borders. By default, resizing is disabled.
public TreeListBuilder<T> Resizable(bool value)
The value for Resizable
Returns:Returns the current TreeListBuilder<T> instance.
The template which renders rows. By default renders a table row (<tr>) for every data source item.
public TreeListBuilder<T> RowTemplate(string value)
The value for RowTemplate
Returns:Returns the current TreeListBuilder<T> instance.
The template which renders rows. By default renders a table row (<tr>) for every data source item.
public TreeListBuilder<T> RowTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the rowtemplate.
Returns:Returns the current TreeListBuilder<T> instance.
The template which renders rows. By default renders a table row (<tr>) for every data source item.
public TreeListBuilder<T> RowTemplateHandler(string templateHandler)
The handler that returs the template for RowTemplate
Returns:Returns the current TreeListBuilder<T> instance.
The template which renders rows. By default renders a table row (<tr>) for every data source item.
public TreeListBuilder<T> RowTemplateId(string templateId)
The ID of the template element for RowTemplate
Returns:Returns the current TreeListBuilder<T> instance.
The template which renders rows. By default renders a table row (<tr>) for every data source item.
public TreeListBuilder<T> RowTemplateView(IHtmlContent templateView)
The view that contains the template for RowTemplate
Returns:Returns the current TreeListBuilder<T> instance.
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.
public TreeListBuilder<T> Scrollable(bool value)
The value for Scrollable
Returns:Returns the current TreeListBuilder<T> instance.
Configures the Kendo UI TreeList search bar settings.
public TreeListBuilder<T> Search(Action<TreeListSearchSettingsBuilder<T>> configurator)
The TreeListSearchSettingsBuilder<T> for the search setting.
Returns:Returns the current instance of TreeListBuilder<T> .
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: row - The user can select a single row. cell - The user can select a single cell. multiple, row - The user can select multiple rows. multiple, cell - The user can select multiple cells.
Specifies whether TreeList selection is allowed. By default selection is disabled
public TreeListBuilder<T> Selectable(Action<TreeListSelectableSettingsBuilder<T>> configurator)
The TreeListSelectableSettingsBuilder<T> for the selectable setting.
Returns:Returns the current instance of TreeListBuilder<T> .
Specifies whether TreeList selection is allowed. By default selection is disabled
public TreeListBuilder<T> Selectable(bool enabled)
Enables or disables the selectable option.
Returns:Returns the current instance of TreeListSelectableSettingsBuilder<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.
public TreeListBuilder<T> Sortable()
Returns the current instance of 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.
public TreeListBuilder<T> Sortable(Action<TreeListSortableSettingsBuilder<T>> configurator)
The TreeListSortableSettingsBuilder<T> for the sortable setting.
Returns:Returns the current instance of TreeListBuilder<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.
public TreeListBuilder<T> Sortable(bool enabled)
Enables or disables the sortable option.
Returns:Returns the current instance of TreeListSortableSettingsBuilder<T> .
Use this overload to configure a list of commands which are displayed in the TreeList toolbar.
public TreeListBuilder<T> Toolbar(Action<TreeListToolbarFactory<T>> configurator)
The configurator for the toolbar setting.
Returns:Returns the current TreeListBuilder<T> instance.
Use this overload ot configure the array of commands and the overflow behavior of the TreeList toolbar.
public TreeListBuilder<T> Toolbar(Action<TreeListToolbarSettingsBuilder<T>> configurator)
The configurator for the toolbar setting.
Returns:Returns the current TreeListBuilder<T> instance.
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..
public TreeListBuilder<T> Toolbar(string template)
The template for the toolbar.
Returns:Returns the current TreeListBuilder<T> instance.
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..
public TreeListBuilder<T> Toolbar<TModel>(TemplateBuilder<TModel> template)
The template component which contains the template.
Returns:Returns the current TreeListBuilder<T> instance.
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..
public TreeListBuilder<T> ToolbarTemplateHandler(string handler)
The view which contains the template.
Returns:Returns the current TreeListBuilder<T> instance.
Sets the id of the script element which contains the client-side toolbar template of the TreeList.
public TreeListBuilder<T> ToolbarTemplateId(string template)
The Id of the script element which contains the template.
Returns:Returns the current TreeListBuilder<T> instance.