I had a custom checkbox column to the grid part of the ultraganttview control and it works fine.
I would like to add a "select all" feature, using a checkbox in the column header of my custom column, like in a normal ultragrid :
http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.2/CLR2.0/html/WinGrid_Displaying_Checkbox_in_Column_Header.html
Is it possible to do the same thing with the ultraganttview control and how?
Thanks,
Hello Vincent,
You can use the normal grid way of enabling the checkbox in the header of the column. The caveat is that the UltraGanttView does not expose the grid it encapsulates, so you'll need to use some reflection to get it. You can use code similar to the following to do so.
var grid = ganttViewType.InvokeMember("grid", BindingFlags.GetField | BindingFlags.Instance | BindingFlags.NonPublic, null, ultraGanttView1, null) as UltraGrid;var column = grid.DisplayLayout.Bands[0].Columns["checkBox"];
Hi,
I had the same idea after reading this post http://ko.infragistics.com/community/forums/t/59490.aspx where reflection is used to exclude columns from the column choser.
So I tried this solution, but the behavior is strange :
- when all the rows are checked the checkbox in the header is checked => that's correct
- when all the rows are unchecked the checkbox in the header is unchecked => that's correct too
But if I click on the checkbox in the header, its checkstate doesn't change.
It seems that the header is a readonly checkbox whereas the checkbox in rows are not readonly.