GridViewColorColumn

GridViewColorColumn allows RadGridView to edit colors using RadColorDialog.

gridview-columns-gridviewcolorcolumn 001

GridViewColorColumn is auto-generated for Color properties in the RadGridView.DataSource. The following code snippet demonstrates how to create it manually, add it to RadGridView and populate it with data:

GridViewColorColumn column = new GridViewColorColumn("Color column");
this.radGridView1.Columns.Add(column);
this.radGridView1.Rows.Add("Red");
this.radGridView1.Rows.Add("Orange");
this.radGridView1.Rows.Add("Yellow");
this.radGridView1.Rows.Add("Green");
this.radGridView1.Rows.Add("Blue");
this.radGridView1.Rows.Add("Indigo");
this.radGridView1.Rows.Add("Violet");

Dim column As New GridViewColorColumn("Color column")
Me.radGridView1.Columns.Add(column)
Me.radGridView1.Rows.Add("Red")
Me.radGridView1.Rows.Add("Orange")
Me.radGridView1.Rows.Add("Yellow")
Me.radGridView1.Rows.Add("Green")
Me.radGridView1.Rows.Add("Blue")
Me.radGridView1.Rows.Add("Indigo")
Me.radGridView1.Rows.Add("Violet")

GridColorPickerEditor

The default editor of the GridViewColorColumn is GridColorPickerEditor which can be accessed in the CellEditorInitialized event. The GridColorPickerElement gives you full access to the RadColorDialogForm by accessing the GridColorPickerElement.ColorDialog.ColorDialogForm property.

gridview-columns-gridviewcolorcolumn 002

See Also

In this article
Not finding the help you need? Improve this article