Edit this page

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.

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>