Home Forums WinForms controls Xceed Grid for WinForms Checkbox in Columns Reply To: Checkbox in Columns

User (Old forums)
Post count: 23064

Hi Jason,

There are two possible options that might be of interest to you:

1- You can use a ValueRow that has a GridCheckBox as a viewer and editor for the desired column and, if your user checks that cell, then it checks all checkboxes in the corresponding column. Of course, the ValueRow would be in the grid’s FixedHeaderSection if you do not want it to scroll with the grid body.

2- If you want the CheckBox to be in the ColumnManagerRow, then you will need to create a class that derives from the ColumnManagerRow class and override the PaintForeground method. In the PaintForeground method, you can then use the Framework’s ControlPaint.DrawCheckBox method to paint the checkbox (according to its state). The only problem you might encounter with this solution is that when you click on the ColumnManagerRow, the grid will be sorted according to the values of that column. You can always set the columns AllowSort property to false to prevent it from being sorted though.

I hope this helps!

Imported from legacy forums. Posted by Matt (had 4554 views)