Hi,
I'm using the CheckBoxOnHeader_CreationFilter class, which I found in the Knowledge Base, to get checkboxes on column headers:
this.ultraGrid1.CreationFilter = aCheckBoxOnHeader_CreationFilter;
I also want to use a header over tables to name them:
this.ultraGrid1.DisplayLayout.Bands[2].HeaderVisible = true;
If I use only one of those two things, there is no exception, but when I use both I get
a NullReferenceException by the time I expand the regarding table.
I get stopped at this line:
// Only put the checkbox into headers whose DataType is booleanif (aHeader.Column.DataType == typeof(bool))
aHeader.Column is null. Does anyone know how I can solve that problem so that I can fulfill both requirements (header AND checkboxes)?
Greetings,
Renelope
Hi Renelope,
If you update to the latest version of the grid, there is now built-in support for header checkboxes and you no longer need the creationfilter.
Hi Mike,
we updated to 10.2 now and I enhanced the code with:
band.Columns(0).Style = ColumnStyle.CheckBoxband.Columns(0).Header.CheckBoxVisibility = HeaderCheckBoxVisibility.Alwaysband.Columns(0).Header.CheckBoxAlignment = HeaderCheckBoxAlignment.Default
That works fine, it checks/unchecks everything on the same hierarchical level.
Unfortunately I need some more logic behind that. Everytime this column of a row is checked, I called within the CellChange event method a specific method which does the logic I mentioned. When I now check all rows via this header checkbox, this event is not called and therefore my specific method neither. Do you know a way I can fix that problem?