New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Definition

Constructors

C#
public TreeList(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContextinitializerIJavaScriptInitializerurlGeneratorIUrlGenerator

Fields

C#
public IUrlGenerator urlGenerator

Properties

The template which renders the alternating table rows. By default the treelist renders a table row (<tr>) for every data source item.

C#
public string AltRowTemplate { get; set; }

The handler for the AltRowTemplate

C#
public string AltRowTemplateHandler { get; set; }

The id for the AltRowTemplate

C#
public string AltRowTemplateId { get; set; }

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.

C#
public bool? AutoBind { get; set; }

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.

C#
public TreeListColumnMenuSettings ColumnMenu { get; set; }

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.

C#
public List<TreeListColumn> Columns { get; set; }
C#
public DataSource DataSource { get; }
C#
public string DataSourceId { get; set; }

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.

C#
public TreeListEditableSettings<T> Editable { get; set; }

Configures the Excel export settings of the TreeList.

C#
public TreeListExcelSettings Excel { get; set; }

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.

C#
public TreeListFilterableSettings Filterable { get; set; }

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

C#
public double? Height { get; set; }

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

C#
public TreeListMessagesSettings Messages { get; set; }

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.

C#
public bool? Navigatable { get; set; }

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.

C#
public TreeListPageableSettings Pageable { get; set; }

Configures the PDF export settings of the TreeList.

C#
public TreeListPdfSettings Pdf { get; set; }

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

C#
public bool? Reorderable { get; set; }

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

C#
public bool? Resizable { get; set; }

The template which renders rows. By default renders a table row (<tr>) for every data source item.

C#
public string RowTemplate { get; set; }

The handler for the RowTemplate

C#
public string RowTemplateHandler { get; set; }

The id for the RowTemplate

C#
public string RowTemplateId { get; set; }

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.

C#
public bool? Scrollable { get; set; }

Configures the Kendo UI TreeList search bar settings.

C#
public TreeListSearchSettings<T> Search { get; set; }
C#
public TreeListSelectableSettings<T> Selectable { get; set; }

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.

C#
public TreeListSortableSettings Sortable { get; set; }

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.; 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. or If an Object value is assigned, it will propagate these properties to the underlying Toolbar:items - an array of commands as explained aboveoverflow - an object that configures the overflow behavior of the toolbar. The same as Toolbar.overflow property.

C#
public TreeListToolbarSettings Toolbar { get; set; }
C#
public string ToolbarTemplate { get; set; }
C#
public string ToolbarTemplateHandler { get; set; }
C#
public string ToolbarTemplateId { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The writer.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)