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

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

Definition

Constructors

Initializes a new instance of the RatingEventBuilder class.

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

The Rating event handlers.

Methods

Defines the handler of the Change client-side event. Fires when the value of the Rating is changed through user interaction.

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

The handler code wrapped in a text tag.

Returns:

RatingEventBuilder

Returns the current instance of RatingEventBuilder .

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

Defines the handler of the Change client-side event. Fires when the value of the Rating is changed through user interaction.

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

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

Returns:

RatingEventBuilder

Returns the current instance of RatingEventBuilder .

Example:
C#
@(Html.Kendo().Rating()
.Name("rating")
.Events(e =&gt; e.Change("onChange"))
)

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

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

The handler code wrapped in a text tag.

Returns:

RatingEventBuilder

Returns the current instance of RatingEventBuilder .

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

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

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

Returns:

RatingEventBuilder

Returns the current instance of RatingEventBuilder .

Defines the handler of the Select client-side event. Fires when an item is selected through user interaction.

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

The handler code wrapped in a text tag.

Returns:

RatingEventBuilder

Returns the current instance of RatingEventBuilder .

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

Defines the handler of the Select client-side event. Fires when an item is selected through user interaction.

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

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

Returns:

RatingEventBuilder

Returns the current instance of RatingEventBuilder .

Example:
C#
@(Html.Kendo().Rating()
.Name("rating")
.Events(e =&gt; e.Select("onSelect"))
)