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 still can't edit the other columns if they are set to not allow edits. I can only edit the one column. Make sure your other columns have AllowCellEdit set to Disabled.
I think overall this whole approach is pretty unintuitive but it seems to work now.
Ok now when I catch the CellValueChanged event, the event is fired correctly but I can't figure out how to check the value of the check box. node.Cells[mykey].Value seems to be permanently stuck on false, even if I checked the box. I set the value somewhere to false manually, if I don't, then value is set to null. I've looked through the properties and see that there is a CheckEditor (EditorResolved) but there are a bunch of exceptions in there and I can't get its value out.
Any idea whats going on? I just need the value of my checkbox when the user clicks the box..
Ok nevermind. Just need to check the e.CurrentValue property. Not sure why I can't find this info through the node but at least I have it.
So basically you created the toggle effect by programming around it ? Surely there has to be a better way to accomplish it ?
No.. The CellClickAction property for the tree set to edit in the designer allows my column to toggle. That is the only column that can be edited because the allowedit property for the other columns are set to not allow edits. Allowing edits seems to be seperate from the cellclickaction. I'm just relaying what the Infragistics support told me was the solution to the problem.
The other thing I was talking about has to do with handling the event firing when the user toggles one of these boxes. The only thing I have to program is how I handle the event, the rest is handled through the designer.
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.