ColorPickerEventBuilder

Methods

Change(System.String)

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.

For more information see Change event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of ColorPickerEventBuilder .

Example

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

Change(System.Func)

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.

For more information see Change event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ColorPickerEventBuilder .

Example

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

Select(System.String)

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.

For more information see Select event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of ColorPickerEventBuilder .

Example

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

Select(System.Func)

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.

For more information see Select event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ColorPickerEventBuilder .

Example

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

Open(System.String)

Defines the handler of the Open client-side event. 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.

RETURNS

Returns the current instance of ColorPickerEventBuilder .

Example

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

Open(System.Func)

Defines the handler of the Open client-side event. 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.

RETURNS

Returns the current instance of ColorPickerEventBuilder .

Example

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

Close(System.String)

Defines the handler of the Close client-side event. 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.

RETURNS

Returns the current instance of ColorPickerEventBuilder .

Example

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

Close(System.Func)

Defines the handler of the Close client-side event. 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.

RETURNS

Returns the current instance of ColorPickerEventBuilder .

Example

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