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 ?
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.
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.
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.
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?
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.
Ok that worked. I set the column to allow editing. I have a few more questions:
Now I do have check boxes showing up but they have a square in the center, instead of false setting. What property sets the value of the check box? I tried the cell's editor.value property but that didn't do anything.
I also can't seem to change the value of the check box by clicking on it. Not sure why, unless I need to catch the click and explicitly change the value of the check box.
On that note what event do I need to catch to detect a change in value?
Thanks for the help.
Thanks for all the help but I am experiencing the same problem as the poster above me. I even tried to set the tree nodestyle to a tricheckboxstate but that didn't work.
I am still having problems with the default value. I cannot seem to set a default value for the checkbox column. I keep getting the standard blue box. And I hate to have to loop through it to set the value to false.
that solved it,
thanx
It is possible that the DataColumn with which the cell you are trying to edit is associated is ReadOnly.
Im new to Infragistics controls. Im having problem with the Wintree control. I have a tree that is databound and I wanna be able to edit some of the data. I have changed the CellClickAction so I can edit the cell. But then i leave the cell I get a mesage that its read only. I have tried to change AllowCellEdit to full, but still the same problem. Does any one know how to fix it?