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

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

Definition

Constructors

Initializes a new instance of the OrgChart class.

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

The client events.

Methods

Defines the handler of the Cancel client-side event. Triggered when the user is about to cancel the changes for the currently edited node. Preventable.

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

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

Returns:

OrgChartEventBuilder

Example:
C#
@( Html.Kendo().OrgChart()
.Name("OrgChart")
.Events(events =&gt; events.Cancel("onCancel"))
)

Defines the handler of the Change client-side event. Triggered when the selected node has been changed upon user interaction.

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

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

Returns:

OrgChartEventBuilder

Example:
C#
@( Html.Kendo().OrgChart()
.Name("OrgChart")
.Events(events =&gt; events.Change("onChange"))
)

Defines the handler of the Collapse client-side event. Triggered before a node has been collapsed upon user interaction. Preventable.

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

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

Returns:

OrgChartEventBuilder

Example:
C#
@( Html.Kendo().OrgChart()
.Name("OrgChart")
.Events(events =&gt; events.Collapse("onCollapse"))
)

Defines the handler of the Create client-side event. Triggered when a node is about to be created upon user interaction. Preventable.

C#
public OrgChartEventBuilder Create(string handler)
Parameters:handlerstring

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

Returns:

OrgChartEventBuilder

Example:
C#
@( Html.Kendo().OrgChart()
.Name("OrgChart")
.Events(events =&gt; events.Create("onCreate"))
)

Defines the handler of the DataBinding client-side event. Triggered before the actual change in the dataSource occurs. Preventable.

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

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

Returns:

OrgChartEventBuilder

Example:
C#
@( Html.Kendo().OrgChart()
.Name("OrgChart")
.Events(events =&gt; events.DataBinding("onDataBinding"))
)

Defines the handler of the DataBound client-side event. Triggered after the dataSource change event has been processed (adding/removing/loading/editing items).

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

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

Returns:

OrgChartEventBuilder

Example:
C#
@( Html.Kendo().OrgChart()
.Name("OrgChart")
.Events(events =&gt; events.DataBound("onDataBound"))
)

Defines the handler of the Delete client-side event. Triggered when a node is about to be deleted as of a consequence of user interaction. Preventable.

C#
public OrgChartEventBuilder Delete(string handler)
Parameters:handlerstring

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

Returns:

OrgChartEventBuilder

Example:
C#
@( Html.Kendo().OrgChart()
.Name("OrgChart")
.Events(events =&gt; events.Delete("onDelete"))
)

Defines the handler of the Edit client-side event. Triggered when a node is about to enter edit mode upon user interaction. Preventable.

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

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

Returns:

OrgChartEventBuilder

Example:
C#
@( Html.Kendo().OrgChart()
.Name("OrgChart")
.Events(events =&gt; events.Edit("onEdit"))
)

Defines the handler of the Expand client-side event. Triggered before a node has been expanded upon user interaction. Preventable.

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

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

Returns:

OrgChartEventBuilder

Example:
C#
@( Html.Kendo().OrgChart()
.Name("OrgChart")
.Events(events =&gt; events.Expand("onExpand"))
)

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

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

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

Returns:

OrgChartEventBuilder

Defines the handler of the Save client-side event. Triggered when the user attempts to save the current changes on the edited node. Preventable.

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

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

Returns:

OrgChartEventBuilder

Example:
C#
@( Html.Kendo().OrgChart()
.Name("OrgChart")
.Events(events =&gt; events.Save("onSave"))
)

Defines the handler of the Select client-side event. Triggered when the user attempts to select a new node or group of nodes (in grouped scenario). Preventable.

C#
public OrgChartEventBuilder Select(string handler)
Parameters:handlerstring

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

Returns:

OrgChartEventBuilder

Example:
C#
@( Html.Kendo().OrgChart()
.Name("OrgChart")
.Events(events =&gt; events.Select("onSelect"))
)