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

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

Definition

Constructors

Initializes a new instance of the ColorPickerEventBuilder class.

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

The ColorPicker event handlers.

Methods

Defines the handler of the Change client-side event. Fires when a color was selected, either by clicking on it (in the simple picker), by clicking ENTER or by pressing "Apply" in the HSV picker.

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

The handler code wrapped in a text tag.

Returns:

ColorPickerEventBuilder

Returns the current instance of ColorPickerEventBuilder .

Example:
C#
@(Html.Kendo().ColorPicker()
.Name("ColorPicker")
.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 a color was selected, either by clicking on it (in the simple picker), by clicking ENTER or by pressing "Apply" in the HSV picker.

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

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

Returns:

ColorPickerEventBuilder

Returns the current instance of ColorPickerEventBuilder .

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

Defines the handler of the Close client-side event. Fires when the picker popup is closing.

C#
public ColorPickerEventBuilder Close(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ColorPickerEventBuilder

Returns the current instance of ColorPickerEventBuilder .

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

Defines the handler of the Close client-side event. Fires when the picker popup is closing.

C#
public ColorPickerEventBuilder Close(string handler)
Parameters:handlerstring

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

Returns:

ColorPickerEventBuilder

Returns the current instance of ColorPickerEventBuilder .

Example:
C#
@(Html.Kendo().ColorPicker()
.Name("ColorPicker")
.Events(events =&gt; events.Close("close"))
)

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

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

The handler code wrapped in a text tag.

Returns:

ColorPickerEventBuilder

Returns the current instance of ColorPickerEventBuilder .

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

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

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

Returns:

ColorPickerEventBuilder

Returns the current instance of ColorPickerEventBuilder .

Defines the handler of the Open client-side event. Fires when the picker popup is opening.

C#
public ColorPickerEventBuilder Open(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ColorPickerEventBuilder

Returns the current instance of ColorPickerEventBuilder .

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

Defines the handler of the Open client-side event. Fires when the picker popup is opening.

C#
public ColorPickerEventBuilder Open(string handler)
Parameters:handlerstring

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

Returns:

ColorPickerEventBuilder

Returns the current instance of ColorPickerEventBuilder .

Example:
C#
@(Html.Kendo().ColorPicker()
.Name("ColorPicker")
.Events(events =&gt; events.Open("open"))
)

Defines the handler of the Select client-side event. Fires as a new color is displayed in the drop-down picker. This is not necessarily the "final" value; for example this event triggers when the sliders in the HSV selector are dragged, but then pressing ESC would cancel the selection and the color will revert to the original value.

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

The handler code wrapped in a text tag.

Returns:

ColorPickerEventBuilder

Returns the current instance of ColorPickerEventBuilder .

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

Defines the handler of the Select client-side event. Fires as a new color is displayed in the drop-down picker. This is not necessarily the "final" value; for example this event triggers when the sliders in the HSV selector are dragged, but then pressing ESC would cancel the selection and the color will revert to the original value.

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

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

Returns:

ColorPickerEventBuilder

Returns the current instance of ColorPickerEventBuilder .

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