New to Telerik UI for ASP.NET Core? Download free 30-day trial

TreeViewEventBuilder

Methods

Change(System.String)

Triggered when the selection has changed (either by the user or through the select method).

For more information see Change event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.Change("onChange"))
            )

Change(System.Func)

Triggered when the selection has changed (either by the user or through the select method).

For more information see Change event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.Change(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

Check(System.String)

Triggered after the user has checked or unchecked a checkbox. If checkChildren is true, the event is triggered after all checked states are updated. This event has been introduced in internal builds after 2014.2.828.

For more information see Check event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.Check("onCheck"))
            )

Check(System.Func)

Triggered after the user has checked or unchecked a checkbox. If checkChildren is true, the event is triggered after all checked states are updated. This event has been introduced in internal builds after 2014.2.828.

For more information see Check event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.Check(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

Collapse(System.String)

Triggered before a subgroup gets collapsed. Cancellable.

For more information see Collapse event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.Collapse("onCollapse"))
            )

Collapse(System.Func)

Triggered before a subgroup gets collapsed. Cancellable.

For more information see Collapse event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.Collapse(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

DataBound(System.String)

Triggered after the dataSource change event has been processed (adding/removing items);

For more information see DataBound event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.DataBound("onDataBound"))
            )

DataBound(System.Func)

Triggered after the dataSource change event has been processed (adding/removing items);

For more information see DataBound event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.DataBound(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

Drag(System.String)

Triggered while a node is being dragged.

For more information see Drag event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.Drag("onDrag"))
            )

Drag(System.Func)

Triggered while a node is being dragged.

For more information see Drag event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.Drag(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

DragEnd(System.String)

Triggered after a node has been dropped.

For more information see DragEnd event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.DragEnd("onDragEnd"))
            )

DragEnd(System.Func)

Triggered after a node has been dropped.

For more information see DragEnd event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.DragEnd(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

DragStart(System.String)

Triggered before the dragging of a node starts.

For more information see DragStart event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.DragStart("onDragStart"))
            )

DragStart(System.Func)

Triggered before the dragging of a node starts.

For more information see DragStart event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.DragStart(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

Drop(System.String)

Triggered when a node is being dropped.

For more information see Drop event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.Drop("onDrop"))
            )

Drop(System.Func)

Triggered when a node is being dropped.

For more information see Drop event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.Drop(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

Expand(System.String)

Triggered before a subgroup gets expanded.

For more information see Expand event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.Expand("onExpand"))
            )

Expand(System.Func)

Triggered before a subgroup gets expanded.

For more information see Expand event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.Expand(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

LoadCompleted(System.String)

This event triggers only when loadOnDemand is set to false - it indicates that all nodes that need to be loaded are ready and present as data items in the DataSource of the TreeView.

For more information see LoadCompleted event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.LoadCompleted("onLoadCompleted"))
            )

LoadCompleted(System.Func)

This event triggers only when loadOnDemand is set to false - it indicates that all nodes that need to be loaded are ready and present as data items in the DataSource of the TreeView.

For more information see LoadCompleted event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.LoadCompleted(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

KendoKeydown(System.String)

Triggered when the user presses a keyboard key while the TreeView is focused.

For more information see KendoKeydown event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.KendoKeydown("onKendoKeydown"))
            )

KendoKeydown(System.Func)

Triggered when the user presses a keyboard key while the TreeView is focused.

For more information see KendoKeydown event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.KendoKeydown(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

Triggered when the user moves the focus on another node

For more information see Navigate event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.Navigate("onNavigate"))
            )

Triggered when the user moves the focus on another node

For more information see Navigate event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.Navigate(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

Select(System.String)

Triggered when a node is being selected by the user. Cancellable.

For more information see Select event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().TreeView()
                        .Name("treeview")
                        .Events(e => e.Select("onSelect"))
            )

Select(System.Func)

Triggered when a node is being selected by the user. Cancellable.

For more information see Select event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @( Html.Kendo().TreeView()
                      .Name("TreeView")
                      .Events(events => events.Select(
                           @<text>
                           function(e) {
                               // event handling code
                           }
                           </text>
                      ))
                      .Render();
            )

In this article
Not finding the help you need?