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

OnClientColorChange

The OnClientColorChange client-side event occurs when the user selects a color from the palette.

The event handler receives parameters:

  1. The color picker instance that fired the event.

  2. Event arguments with the following properties:

    • get_oldValue: returns the selected color from just prior to the change.

The example below displays the new and old values.

ASP.NET
function colorChange(sender, eventArgs)
{
   var myDiv = document.getElementById("myDiv");
   myDiv.innerHTML = 'Color changed from ' + eventArgs.get_oldColor()
       + " to " + sender.get_selectedColor();
}
...
<telerik:RadColorPicker
   ID="RadColorPicker1"
   runat="server"
   Preset="Standard"
   OnClientColorChange="colorChange">
</telerik:RadColorPicker>
Not finding the help you need?
Contact Support