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

Defines the fluent API for configuring the Kendo TreeList for ASP.NET MVC events.

Definition

Constructors

C#
public TreeListEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

Methods

Defines the handler of the BeforeEdit client-side event. Fires when the user tries to edit or creates a data item before the editor is created. Can be used for preventing the editing depending on custom logic. The event handler function context (available through the this keyword) will be set to the widget instance. The event will be fired only when the TreeList is editable.

C#
public TreeListEventBuilder BeforeEdit(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the BeforeEdit event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.BeforeEdit("onBeforeEdit");
})
)

Defines the handler of the Cancel client-side event. Fires when the user clicks the Cancel button (in inline or popup edit mode) or closes the popup window. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder Cancel(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Cancel event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.Cancel("onCancel");
})
)

Defines the handler of the CellClose client-side event. Fires when the incell edit mode is used and the cell will be closed. The event is triggered after saving or canceling the changes but before the cell is closed. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder CellClose(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the CellClose event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.CellClose("onCellClose");
})
)

Defines the handler of the Change client-side event. Fires when the user selects a table row or cell in the TreeList. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder Change(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Change event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.Change("onChange");
})
)

Defines the handler of the Collapse client-side event. Fires when an item is about to be collapsed. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder Collapse(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Collapse event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.Collapse("onCollapse");
})
)

Defines the handler of the ColumnHide client-side event. Fires when the user hides a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder ColumnHide(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnHide event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.ColumnHide("onColumnHide");
})
)

Defines the handler of the ColumnLock client-side event. Fires when the user lock a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder ColumnLock(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnLock event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.ColumnLock("onColumnLock");
})
)

Defines the handler of the ColumnMenuInit client-side event. Fires when the column menu is initialized. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder ColumnMenuInit(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnMenuInit event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.ColumnMenuInit("onColumnMenuInit");
})
)

Defines the handler of the ColumnMenuOpen client-side event. Fires when the column menu is opened. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder ColumnMenuOpen(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnMenuOpen event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.ColumnMenuOpen("onColumnMenuOpen");
})
)

Defines the handler of the ColumnReorder client-side event. Fires when the user changes the order of a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder ColumnReorder(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnReorder event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.ColumnReorder("onColumnReorder");
})
)

Defines the handler of the ColumnResize client-side event. Fires when the user resizes a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder ColumnResize(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnResize event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.ColumnResize("onColumnResize");
})
)

Defines the handler of the ColumnShow client-side event. Fires when the user shows a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder ColumnShow(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnShow event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.ColumnShow("onColumnShow");
})
)

Defines the handler of the ColumnUnlock client-side event. Fires when the user unlock a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder ColumnUnlock(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnUnlock event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.ColumnUnlock("onColumnUnlock");
})
)

Defines the handler of the DataBinding client-side event. Fires before the widget binds to its data source. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder DataBinding(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DataBinding event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.DataBinding("onDataBinding");
})
)

Defines the handler of the DataBound client-side event. Fires when the widget is bound to data from its data source. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder DataBound(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DataBound event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.DataBound("onDataBound");
})
)

Defines the handler of the Drag client-side event. (Available as of the 2015.3.1014 release) Fires while the user is dragging and item. This event is triggered on every mouse move. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder Drag(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Drag event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.Drag("onDrag");
})
)

Defines the handler of the DragEnd client-side event. (Available as of the 2015.3.1014 release) Fires when the user finishes dragging an item and the model was updated. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder DragEnd(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DragEnd event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.DragEnd("onDragEnd");
})
)

Defines the handler of the DragStart client-side event. (Available as of the 2015.3.1014 release) Fires when the user attempts to drag an item. If prevented, the item is not allowed to move. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder DragStart(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DragStart event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.DragStart("onDragStart");
})
)

Defines the handler of the Drop client-side event. (Available as of the 2015.3.1014 release) Fires when the user drops an item. If prevented, the source row will not be moved. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder Drop(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Drop event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.Drop("onDrop");
})
)

Defines the handler of the Edit client-side event. Fires when the user edits or creates a data item. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder Edit(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Edit event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.Edit("onEdit");
})
)

Defines the handler of the ExcelExport client-side event. Fires when the user clicks the Export to Excel toolbar button.

C#
public TreeListEventBuilder ExcelExport(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ExcelExport event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.ExcelExport("onExcelExport");
})
)

Defines the handler of the Expand client-side event. Fires when an item is about to be expanded. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder Expand(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Expand event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.Expand("onExpand");
})
)

Defines the handler of the FilterMenuInit client-side event. Fires when the TreeList filter menu is initialized. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder FilterMenuInit(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the FilterMenuInit event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.FilterMenuInit("onFilterMenuInit");
})
)

Defines the handler of the FilterMenuOpen client-side event. Fires when the TreeList filter menu is opened. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder FilterMenuOpen(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the FilterMenuOpen event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.FilterMenuOpen("onFilterMenuOpen");
})
)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the TreeList is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the KendoKeydown event.

Returns:

TreeListEventBuilder

Defines the handler of the PdfExport client-side event. Fires when the user clicks the Export to PDF toolbar button.

C#
public TreeListEventBuilder PdfExport(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the PdfExport event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.PdfExport("onPdfExport");
})
)

Defines the handler of the Remove client-side event. Fires when the user clicks the Destroy command button. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder Remove(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Remove event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.Remove("onRemove");
})
)

Defines the handler of the Save client-side event. Fires when a data item is saved. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder Save(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Save event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.Save("onSave");
})
)

Defines the handler of the SaveChanges client-side event. Fires when the user clicks the Save command button. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public TreeListEventBuilder SaveChanges(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the SaveChanges event.

Returns:

TreeListEventBuilder

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Events(e =&gt;
{
e.SaveChanges("onSaveChanges");
})
)