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

Defines the fluent interface for configuring the Editor events.

Definition

Constructors

Initializes a new instance of the EditorEventBuilder class.

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

The client events.

Methods

Defines the inline handler of the Change client-side event. Fires when Editor is blurred and its content has changed.

C#
public EditorEventBuilder Change(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events.Change(@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the Change client-side event. Fires when Editor is blurred and its content has changed.

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

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

Returns:

EditorEventBuilder

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

Defines the inline handler of the Execute client-side event. Fires when an Editor command is executed.

C#
public EditorEventBuilder Execute(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events.Execute(@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the Execute client-side event. Fires when an Editor command is executed.

C#
public EditorEventBuilder Execute(string handler)
Parameters:handlerstring

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

Returns:

EditorEventBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events.Execute("onExecute"))
)

Defines the inline handler of the KeyDown client-side event. Fires when the user depresses a keyboard key. Triggered multiple times if the user holds the key down.

C#
public EditorEventBuilder KeyDown(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Keydown(@&lt;text&gt;
function(ev) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the KeyDown client-side event. Fires when the user depresses a keyboard key. Triggered multiple times if the user holds the key down.

C#
public EditorEventBuilder KeyDown(string handler)
Parameters:handlerstring

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

Returns:

EditorEventBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events.KeyDown("onKeyDown"))
)

Defines the inline handler of the KeyUp client-side event. Fires when the user releases a keyboard key.

C#
public EditorEventBuilder KeyUp(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Keyup(@&lt;text&gt;
function(ev) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the KeyUp client-side event. Fires when the user releases a keyboard key.

C#
public EditorEventBuilder KeyUp(string handler)
Parameters:handlerstring

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

Returns:

EditorEventBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events.KeyUp("onKeyUp"))
)

Defines the inline handler of the Paste client-side event. Fires before the content is pasted in the Editor.

C#
public EditorEventBuilder Paste(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Paste(@&lt;text&gt;
function(ev) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the Paste client-side event. Fires before the content is pasted in the Editor.

C#
public EditorEventBuilder Paste(string handler)
Parameters:handlerstring

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

Returns:

EditorEventBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events.Paste("onPaste"))
)

Defines the inline handler of the Select client-side event. Fires when the Editor selection has changed.

C#
public EditorEventBuilder Select(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Select(@&lt;text&gt;
function(ev) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the Select client-side event. Fires when the Editor selection has changed.

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

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

Returns:

EditorEventBuilder

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