Supposing you have an UltraWinGrid with only one band this code will loop over every row and select or unselect the column in question
public void SetSelection(string colName, bool sel)
{
foreach(UltraGridRow r in grid.Rows)
{
if(r.IsDataRow == true)
r.Cells[colName].Value = sel;
}
}
Did you know that in the latest versions of UltraGrid there is the functionality to add a checkbox in the header of the boolean column to allow the checking/unchecking of all columns directly from that check
gridCol.Header.CheckBoxAlignment = HeaderCheckBoxAlignment.Left;
gridCol.Header.CheckBoxSynchronization = HeaderCheckBoxSynchronization.RowsCollection;
gridCol.Header.CheckBoxVisibility = HeaderCheckBoxVisibility.WhenUsingCheckEditor;