Home Forums WinForms controls Xceed Grid for WinForms checkbox as editor Reply To: checkbox as editor

User (Old forums)
Post count: 23064

First of all: the column must be of type boolean.
Second: you should set the CellViewer- and CellEditor-properties of the column to an instance of the checkbox-editor, like this:<code>Xceed.Grid.Editors.GridCheckBox checkbox = new Xceed.Grid.Editors.GridCheckBox();
grid.Columns[“myBooleanColumn”].CellViewer = checkbox;
grid.Columns[“myBooleanColumn”].CellEditor = checkbox;</code>If you have multiple boolean columns that need a checkbox viewer/editor, you can create 1 instance, and assign it to all those columns. You don’t have to create a separate instance for each column.

Imported from legacy forums. Posted by Tommy (had 3461 views)