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

Defines the fluent interface for configuring sortable client events.

Definition

Constructors

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

Methods

Defines the inline handler of the Cancel client-side event

C#
public SortableEventBuilder Cancel(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag (Razor syntax).

Returns:

SortableEventBuilder

Example:
C#
@(Html.Kendo().Sortable()
.For("#element")
.Events(events =&gt; events.Cancel(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the name of the JavaScript function that will handle the Cancel client-side event.

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

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

Returns:

SortableEventBuilder

Example:
C#
@(Html.Kendo().Sortable()
.For("#element")
.Events(events =&gt; events.Cancel("cancel"))
)

Defines the inline handler of the Change client-side event

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

SortableEventBuilder

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

Defines the name of the JavaScript function that will handle the Change client-side event.

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

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

Returns:

SortableEventBuilder

Example:
C#
@(Html.Kendo().Sortable()
.For("#element")
.Events(events =&gt; events.Change("change"))
)

Defines the inline handler of the End client-side event

C#
public SortableEventBuilder End(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag (Razor syntax).

Returns:

SortableEventBuilder

Example:
C#
@(Html.Kendo().Sortable()
.For("#element")
.Events(events =&gt; events.End(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the name of the JavaScript function that will handle the End client-side event.

C#
public SortableEventBuilder End(string handler)
Parameters:handlerstring

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

Returns:

SortableEventBuilder

Example:
C#
@(Html.Kendo().Sortable()
.For("#element")
.Events(events =&gt; events.End("end"))
)

Defines the inline handler of the KendoKeydown client-side event

C#
public virtual SortableEventBuilder KendoKeydown(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag (Razor syntax).

Returns:

SortableEventBuilder

Defines the name of the JavaScript function that will handle the KendoKeydown client-side event.

C#
public virtual SortableEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

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

Returns:

SortableEventBuilder

Defines the inline handler of the Move client-side event

C#
public SortableEventBuilder Move(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag (Razor syntax).

Returns:

SortableEventBuilder

Example:
C#
@(Html.Kendo().Sortable()
.For("#element")
.Events(events =&gt; events.Move(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the name of the JavaScript function that will handle the Move client-side event.

C#
public SortableEventBuilder Move(string handler)
Parameters:handlerstring

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

Returns:

SortableEventBuilder

Example:
C#
@(Html.Kendo().Sortable()
.For("#element")
.Events(events =&gt; events.Move("move"))
)

Defines the inline handler of the Start client-side event

C#
public SortableEventBuilder Start(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag (Razor syntax).

Returns:

SortableEventBuilder

Example:
C#
@(Html.Kendo().Sortable()
.For("#element")
.Events(events =&gt; events.Start(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the name of the JavaScript function that will handle the Start client-side event.

C#
public SortableEventBuilder Start(string handler)
Parameters:handlerstring

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

Returns:

SortableEventBuilder

Example:
C#
@(Html.Kendo().Sortable()
.For("#element")
.Events(events =&gt; events.Start("start"))
)