How to make all cells in the column except the headers have certain formatting? The columns setting should be automatically applied to new rows when they are added at runtime.
You can specify default settings for individual columns with SetStyleRange when you specify a column range. A column range is created with CGXRange().SetCols(nFromCol, nToCol). When new rows are added to the grid the setting will be automatically applied to the new row.
Here is an example how to use SetStyleRange for a column range:
// Apply checkbox to all cells in column.
SetStyleRange(CGXRange( ).SetCols(nCol),
CGXStyle()
.SetControl(GX_IDS_CTRL_CHECKBOX3D)
.SetChoiceList(_T(“Checkbox”))
);
You can do the same with row ranges.