Home Forums WinForms controls Xceed Grid for WinForms Color editor Reply To: Color editor

User (Old forums)
Post count: 23064

In an Xceed grid it is possible to use an own control for editting a value in a xceed grid cell.

I want to use an Color picker to select a color.
When i use the control Janus.Windows.EditControls.UIColorButton i get an red cross in the grid, see also the screenshot (UIColorButton.jpg)

I have the same problem when use an DevComponents.DotNetBar.ColorPickerButton control (see screenshot ColorPickerButton.jpg)

For setting the color i use something like this, but this wont work because of the red cross.

//DevComponents.DotNetBar.ColorPickerButton cp = datarow.Cells[profileColumn].CellViewerManager.Control as DevComponents.DotNetBar.ColorPickerButton;
//if (cp != null)
//    cp.SelectedColor = (Color)value;


code for  Janus.Windows.EditControls.UIColorButton 
pCell => Xceed.Grid.Cell > is the cell in the xceed grid
 Janus.Windows.EditControls.UIColorButton cb = new Janus.Windows.EditControls.UIColorButton();
pCell.CellEditorManager = new CellEditorManager(cb, “SelectedColor”, true, true);
pCell.CellViewerManager = new CellViewerManager(cb, “SelectedColor”);
code for DevComponents.DotNetBar.ColorPickerButton 
DevComponents.DotNetBar.ColorPickerButton cpButton = new DevComponents.DotNetBar.ColorPickerButton();
pCell.CellEditorManager = new CellEditorManager(cpButton, “SelectedColor”, true, true);
pCell.CellViewerManager = new CellViewerManager(cpButton, “SelectedColor”);


Imported from legacy forums. Posted by Insider (had 713 views)