Home Forums WinForms controls Xceed Grid for WinForms checkbox as editor

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #13817 |

    how can i edit a column as checkbox ? anyone with sample code?

    Imported from legacy forums. Posted by PETE (had 2096 views)

    User (Old forums)
    Member
    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)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.