ColorPicker - Client-side Events

Pick Color(Current Color is #FF0000)

Event log

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

The client-side events of the RadColorPicker are:

  • OnClientLoad - raised when the color picker is initialized
  • OnClientColorPreview - raised when the user previews a color in the color picker
  • OnClientColorChange - raised just before the selected color of the color picker changes. The selection can be cancelled here.
  • OnClientColorChanging - raised when the selected color of the color picker changes
  • OnClientPopUpShow - raised when the palette popup shows (if ShowIcon is set to true)
  • DefaultCS.aspx
  • scripts.js
  • styles.css
<%@ Page Language="c#" AutoEventWireup="false"  %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
    <script src="scripts.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-containers">
        <div class="demo-container size-thin">
            <telerik:RadColorPicker RenderMode="Lightweight" ID="RadColorPicker1" SelectedColor="Red" runat="server" ShowIcon="true" PaletteModes="all"
                OnClientLoad="TelerikDemo.OnClientLoad"
                OnClientColorChanging="TelerikDemo.OnClientColorChanging"
                OnClientColorChange="TelerikDemo.OnClientColorChange"
                OnClientColorPreview="TelerikDemo.OnClientColorPreview"
                OnClientPopUpShow="TelerikDemo.OnClientPopUpShow">
            </telerik:RadColorPicker>
        </div>
    </div>
    <qsf:EventLogConsole ID="EventLogConsole1" runat="server" AllowClear="true"></qsf:EventLogConsole>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?