I am using a hierarchical dataset as datasource for my wintree. Because it consists of multiple layers I need the column headers displayed. However I also want the checkbox infront of the rows. Is there a way I can display the checkbox in the grid viewstyle ?
If you don't explicitly set the AllowCellEdit property to a value that enables cell editing, an EditorWithText editor is used for all columns (this was necessary to maintain legacy behavior since support for cell editing was not added until after multi-column support was). You have to either set AllowCellEdit (exposed by UltraTree.ColumnSettings, UltraTreeColumnSet, UltraTreeNodeColumn) explicitly, or if you want the check but don't want to enable editing for that column, assign a CheckEditor to the column's Editor property.
I'm not sure I'm understanding this correctly. I'm making my columns at run time. Then I've created a checkColumn:
UltraTreeNodeColumn checkColumn = new UltraTreeNodeColumn();checkColumn.Key = "Check";checkColumn.DataType = System.Type.GetType("Bool");
I've also tried checkColumn.DataType = typeof(Boolean);
I end up with an empty column, the header reads "Check" so I know its the right column but there are no check boxes in the cells. I must be misunderstanding your instructions. Is there an example of this somewhere?
You need to add an unbound column to the ColumnSet your tree is using. Since you have multiple levels in your hierarchy, you probably have multiple ColumnSets.
If you are allowing the tree to just automatically generate theColumnSets (the default), then you could handle the ColumnSetGenerated event. In this event, you would add the new column and set it's DataType to bool to make it show as a checkbox column.
Thank you for helping me, how would I add a checkbox column to the wintree ? I cannot seem to find a checkboxcolumn type for the treeview.
No, you can't get a checkbox to appear "in front of the rows". You can, however, have a column whose DataType is bool (or CheckState), which will cause a CheckEditor to be used by that column.