Tab
A newer version of this page is available. Switch to the current version.

ASPxColorEdit.ColumnCount Property

Gets or sets the number of columns displayed in a color table.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue(8)]
public int ColumnCount { get; set; }
<DefaultValue(8)>
Public Property ColumnCount As Integer

Property Value

Type Default Description
Int32

8

An Int32 value that specifies the number of columns.

Remarks

Use the ColumnCount property to specify the number of columns that are displayed in a color table. The number of items are defined by the length of the ASPxColorEdit.Items collection.

This property is a wrapper of the ColorEditProperties.ColumnCount property.

Examples

This example demonstrates how to customize the ASPxColorEditor Items collection. The image below shows the result.

ASPxColorEdit_GreenPalette

using System.Drawing;

protected void Page_Load(object sender, EventArgs e) {
     Color color = Color.Empty;
     // Create a green palette that contains 24 color items
     for (int i = 0; i < 24; i++) {
          color = Color.FromArgb(0, i * 256 / 24, 0);
          ceGreenPalette.Items.Add(color);
     }
}
See Also