Dear all,
perhaps I am being stupid but it seems rather difficult to display a simple UltraTree with some columns set to checkboxes. As an aside I find the Infragistics documentation very poor on all sorts of things, to the point I now no longer use it and try google instead.
But back to my main point, as a first step I tried getting an UltraTree with columns. I've tried all the advice of different dispaly styles, etc. with no luck. I've attached a simple project showing my point. I've created a form with an UltraTree which has 3 columns at design time, one should be a string with the other two booleans (for the check boxes). This is then populated with nodes but I can not get the columns to appear.
There is no binding to a datasource as I intend to extend this once I have the basics working, and for instance the parent nodes will have check boxes which set all the child nodes, but really in the datasource only the child nodes exist (so, as I understand it, binding wouldn't work).
I do not want grids within nodes, like the examples show, besides for me personally thinking it looks ugly and information overload, I do not require it as all the nodes will have the same columns so I only need one set of headers at the very top.
Where am I going wrong?
Regards,
Yip that's fixed it thanks Mike.
It doesn't have to be an object to support indeterminate state. For Indeterminate, you use DBNull.Value. This is, in fact, the initial state in the sample.
Thanks for that Mike.
However, I set the underlying DataType to be objects and not booleans to prevent a casting issue. This is demonstrated in the attached example. Basically the same project but with just the CheckBox column, however when un/checking a checkbox any children if present are set to the same value and any parents are updated to reflect the values of their children.
Setting the children is fine. However, trying to set the parent to an indeterminate state can not be done as it is a boolean and must therefore be true or false.
To reproduce:
1 - Run the attached project
2 - Expand the A and A1 node
3 - Uncheck the A1 checkbox, all the A1 children correctly become unchecked
4 - Check one of the A1 children. It now doesn't know how to set the A1 node. It should be indeterminate but the DataType is boolean which has no equivalent
Hi,
The ComboBox column in your sample is working just fine. I can drop down the list and update it.
The "Full" column isn't working because the DataType of the column is object and the UltraCheckEditor doesn't know what to do with an object, it needs a better data type like bool.
Hi Mike,
I was doing the resize before adding the contents :(
If you look at the latest example in my last post, you'll see I have CellClickAction set to EditCell and I have columns for all the AllowCellEdit settings, but none of them allow me to edit the checkbox value/state.