New to Telerik UI for ASP.NET MVCStart a free 30-day trial

Events

The Telerik UI ColorPalette for ASP.NET MVC exposes a Change event that allows you to control the behavior of the UI component.

For a runnable example on the component Change event, refer to the demo on using the events of the ColorPalette.

Handling by Handler Name

The following example demonstrates how to subscribe to the Change event by a handler name.

Razor
    @(Html.Kendo().ColorPalette()
        .Name("colorpalette")
        .Events(e => e
            .Change("colorpalette_change")
        )
    )

Handling by Template Delegate

The following example demonstrates how to handle the Change event by a template delegate.

Razor
    @(Html.Kendo().ColorPalette()
          .Name("colorpalette")
          .Events(ev => ev
              .Change(@<text>
                function(e) {
                    // Handle the change event inline.
                    console.log(e.sender.value());
                }
                </text>)
          )
    )

Next Steps

See Also