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

ColorPickerEventBuilder

Methods

Change(System.String)

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.

For more information see Change event.

Parameters

handler - System.String

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

Example


            @(Html.Kendo().ColorPicker()
                        .Name("ColorPicker")
                        .Events(events => events.Change("change"))
            )

Change(System.Func)

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.

For more information see Change event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


             @(Html.Kendo().ColorPicker()
                       .Name("ColorPicker")
                       .Events(events => events.Change(
                            @<text>
                            function(e) {
                                // event handling code
                            }
                            </text>
                       ))
             )

Select(System.String)

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.

For more information see Select event.

Parameters

handler - System.String

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

Example


            @(Html.Kendo().ColorPicker()
                        .Name("ColorPicker")
                        .Events(events => events.Select("change"))
            )

Select(System.Func)

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.

For more information see Select event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


             @(Html.Kendo().ColorPicker()
                       .Name("ColorPicker")
                       .Events(events => events.Select(
                            @<text>
                            function(e) {
                                // event handling code
                            }
                            </text>
                       ))
             )

Open(System.String)

Fires when the picker popup is opening.

For more information see Open event.

Parameters

handler - System.String

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

Example


            @(Html.Kendo().ColorPicker()
                        .Name("ColorPicker")
                        .Events(events => events.Open("open"))
            )

Open(System.Func)

Fires when the picker popup is opening.

For more information see Open event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


             @(Html.Kendo().ColorPicker()
                       .Name("ColorPicker")
                       .Events(events => events.Open(
                            @<text>
                            function(e) {
                                // event handling code
                            }
                            </text>
                       ))
             )

Close(System.String)

Fires when the picker popup is closing.

For more information see Close event.

Parameters

handler - System.String

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

Example


            @(Html.Kendo().ColorPicker()
                        .Name("ColorPicker")
                        .Events(events => events.Close("close"))
            )

Close(System.Func)

Fires when the picker popup is closing.

For more information see Close event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


             @(Html.Kendo().ColorPicker()
                       .Name("ColorPicker")
                       .Events(events => events.Close(
                            @<text>
                            function(e) {
                                // event handling code
                            }
                            </text>
                       ))
             )

In this article
Not finding the help you need?