How do I set the state of the HeaderCheckBox to become unchecked instead of in this indeterminite state (see attachment). I have tried a number variations on the following lines of code which is run after the datasource and databind calls.
ugReleases.DisplayLayout.Bands(0).Columns("Select").SetHeaderCheckedState(ugReleases.Rows, False)
ugReleases.DisplayLayout.Bands(0).Columns("Select").SetHeaderCheckedState(ugReleases.Rows, CheckState.Unchecked)
Thanks
Scott
HI,
Could you clarify for me if all the rows in that band are included in the ugReleases.Rows collection?
I would expect that if the Header check box is checked, which it appears to be, then all the row check boxes in that column would also be checked. You image only shows a few rows and perhaps that is part of the issue.
I used this code to add an unbound boolean column and connect it to the rows collection setting it initially to true.
this.ultraGrid1.DisplayLayout.Bands[0].Columns.Add("Test", "Test");
boolColumn = this.ultraGrid1.DisplayLayout.Bands[0].Columns["Test"];
boolColumn.DataType = typeof(Boolean);
this.ultraGrid1.DisplayLayout.Bands[0].Columns["Test"].Header.CheckBoxVisibility = HeaderCheckBoxVisibility.Always;
RowsCollection rColl = this.ultraGrid1.Rows;
this.ultraGrid1.DisplayLayout.Bands[0].Columns["Test"].SetHeaderCheckedState( rColl, true);
foreach (UltraGridRow row in this.ultraGrid1.Rows)
{
row.Cells["Test"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
}