Skip to main content

ASPxClientColorEdit.ColorChanged Event

Occurs on the client after a user changes the selected color in the color editor.

#Declaration

TypeScript
ColorChanged: ASPxClientEvent<ASPxClientProcessingModeEventHandler<ASPxClientColorEdit>>

#Event Data

The ColorChanged event's data class is ASPxClientProcessingModeEventArgs. The following properties provide information specific to this event:

Property Description
processOnServer Specifies whether or not to process the event on the server.

#Remarks

The ColorChanged event allows you to respond to the editor’s selected color being changed by an end-user.

#Example

This part of the ASPxColorEdit online demo illustrates how the ASPxColorEdit can be used to customize the colors for the ASPxRoundPanel.

...
<dxe:ASPxColorEdit runat="server" ID="ColorEditHeaderBackColor" Color="#dedede">
    <ClientSideEvents ColorChanged="ColorChangedHandler" />
</dxe:ASPxColorEdit>
...
<dxcp:ASPxCallbackPanel runat="server" ID="CallbackPanel" 
ClientInstanceName="CallbackPanel" Width="275px" Height="119px" 
HideContentOnCallback="False">
    <PanelCollection>
        <dxp:PanelContent runat="server">
            <dxrp:ASPxRoundPanel runat="server" ID="RoundPanel" 
            EnableTheming="False" ShowDefaultImages="False">
                <PanelCollection>
                    <dxp:PanelContent runat="server">
                        <div style="width: 250px; height: 60px;">
                        Content
                        </div>
                   </dxp:PanelContent>
               </PanelCollection>
               <HeaderStyle>
                  <BorderBottom BorderWidth="0px" />
               </HeaderStyle>
           </dxrp:ASPxRoundPanel>
        </dxp:PanelContent>
    </PanelCollection>
</dxcp:ASPxCallbackPanel>
...
 public partial class ASPxColorEdit_Example : BasePage {
     protected void Page_Load(object sender, EventArgs e) {
         RoundPanel.HeaderStyle.BackColor = ColorEditHeaderBackColor.Color;
         ...
     }
 }
function ColorChangedHandler(s, e) {
    CallbackPanel.PerformCallback();
}
See Also