Hi,
I have a simple ultragrid bound to a database that countains bit (boolean) columns.
It is a requirement to be able to update all of the values in a row at once from the header, which can be achieved using the Column CheckBox properties:
col.Header.CheckBoxAlignment = HeaderCheckBoxAlignment.Right;col.Header.CheckBoxSynchronization = RowsCollection;col.Header.CheckBoxVisibility = HeaderCheckBoxVisibility.WhenUsingCheckEditor;
I also have the need to be able to set the values to True, False or Null, which can also be achieved using the property:
col.Style = Infragistics.Win.UltraWinGrid.
ColumnStyle.TriStateCheckBox;
My problem is, that the CheckBoxHeader only allows the user to do a bulk update on the values to either True or False.. (not null)Is there a way to tell the header checkbox that it is also TriState?
I can't seem to find the property anywhere to do this.
Thanks in advance,
Craig
The checkbox in the header uses the indeterminate state to depict mixed check states in the cells, i.e., if at least one but not all cells are checked, the header checkbox shows as indeterminate. Because of this there is no way to use the header checkbox to set the cells to the indeterminate state. One possible solution to your problem would be to use a context menu that shows an item to reset all cell values when you right-click on the column header, then in the click event for that items iterate through the rows and set the cell value to null/indeterminate.
Ahhh.. ok.. that makes sense.. Thanks Brian..
One other related question, is that the header checkbox sets the check value on the entire dataset, not the current dataset which is not what I expected..
Current dataset, meaning that if a apply a filter to the grid (say a date range) and I want to use the checkbox header to select all items in that date rage.. I can't..
Is there any properties to modify this?I'm thinking that I may just need to build the lot in context menu's as suggested, and handle this myself using the Row.IsFilteredOut variables to mark them manually.
CraigSDC said: Current dataset, meaning that if a apply a filter to the grid (say a date range) and I want to use the checkbox header to select all items in that date rage.. I can't..