You can use QueryCellStyleInfo to set the checkbox into a single header cell. You will need to have a varaible that maintains the value of this checkbox as well. You can set this in a TableControlCellClick event.
private bool col2Check = false;
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if(e.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell
&& e.TableCellIdentity.Column.Name == "Col2")
{
e.Style.CellType = "CheckBox";
e.Style.Description = e.Style.Text;
e.Style.CellValue = this.col2Check;
e.Style.Enabled = true;
//e.Style.BackColor = SystemColors.Window;
//e.Style.CellAppearance = GridCellAppearance.Raised;
}
}
private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
{
GridTableCellStyleInfo style = e.TableControl.Model[e.Inner.RowIndex, e.Inner.ColIndex];
if(style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell
&& style.TableCellIdentity.Column.Name == "Col2")
{
this.col2Check = !this.col2Check;
e.Inner.Cancel = true;
}
}