aspnetbootstrap-devexpress-dot-web-dot-bootstrap-82f60b5a.md
Represents a control that allows end users to specify a color.
Namespace : DevExpress.Web.Bootstrap
Assembly : DevExpress.Web.Bootstrap.v25.2.dll
NuGet Package : DevExpress.Web.Bootstrap
[DXClientDocumentationProviderWeb("BootstrapColorEdit")]
[ToolboxTabName("DX.25.2: Bootstrap Controls")]
public class BootstrapColorEdit :
ASPxColorEdit,
ISimpleRenderControl,
IBootstrapEditorCssClassesOwner
<ToolboxTabName("DX.25.2: Bootstrap Controls")>
<DXClientDocumentationProviderWeb("BootstrapColorEdit")>
Public Class BootstrapColorEdit
Inherits ASPxColorEdit
Implements ISimpleRenderControl,
IBootstrapEditorCssClassesOwner
The Color Edit control allows end users to specify a color. They can pick a color from the drop-down palette or type any of the following values in the edit box:
To disable user input through the editor’s text box, set the AllowUserInput property to false. Use the Color / Value properties to specify the editor’s value in the color-based or text format, respectively.
To show the Custom Color palette, set the EnableCustomColors property to true.
Use the Items property to change the colors in the drop-down palette.
<dx:BootstrapColorEdit ID="ColorEditPallete" runat="server"/>
protected void Page_Load(object sender, EventArgs e) {
ColorEditPallete.Items.Clear();
ColorEditPallete.Items.Add(System.Drawing.Color.FromArgb(86, 61, 124));
ColorEditPallete.Items.Add(System.Drawing.Color.FromArgb(203, 189, 226));
ColorEditPallete.Items.Add(System.Drawing.Color.FromArgb(229, 225, 234));
ColorEditPallete.Items.Add(System.Drawing.Color.FromArgb(249, 249, 249));
ColorEditPallete.Items.Add(System.Drawing.Color.FromArgb(255, 255, 255));
ColorEditPallete.Items.Add(System.Drawing.Color.FromArgb(255, 255, 255));
}
To show an Automatic Color Item at the top of the palette, set the EnableAutomaticColorItem property to true. The AutomaticColor property specifies the item’s color.
Use the Caption and the HelpText properties to specify the Color Edit’s caption and auxiliary help text, respectively.
Use the NullText property to display prompt text (watermark) in the editor’s edit box. The specified text is displayed when the editor’s value is null and the editor is not focused. The prompt text disappears when the editor is focused.
To specify whether the text should also be displayed in the focused state, use the NullTextDisplayMode property.
<dx:BootstrapColorEdit runat="server" NullText="Select a color" NullTextDisplayMode="UnfocusedAndFocused"/>
Note
The client-side equivalent of this editor control is the BootstrapClientColorEdit object. The editor’s client-side API is enabled if the EnableClientSideAPI property is set to true , the ClientInstanceName property is defined, or any client event is handled. Available client events can be accessed via the ClientSideEvents property.
Show 16 items
Object Control WebControl ASPxWebControlBase ASPxWebControl ASPxDataWebControlBase ASPxDataWebControl ASPxEditBase ASPxEdit ASPxTextEdit ASPxPureTextBoxBase ASPxTextBoxBase ASPxButtonEditBase ASPxDropDownEditBase ASPxColorEdit BootstrapColorEdit
See Also