Hi,
Can anyone help with his please ?
I am currently manually populating nodes within an ultratree due to a complex data hierarchy. Ideally I would like to be able to place a textbox next to each tree node to enable the user to enter a value. Note, I am not trying to change the node text property, but instead record a value against each node and access this later within code.
I had assumed ( hoped ) that setting the ViewStyle to "Grid" should present columns to permit user editing capabilities. This certainly happens for a normal databound treeview, but, being manually populated this doesn't work. I guess I can't really expect it to because the tree isn't aware of the data structure.
Is there a correct way of providing textbox editing capabilities within a treeview whose nodes are being created in code ? Is it a case of manually creating some kind of column set for example ?
Thanks,
Nick
Cell editing was not enabled with the first release of multi-column support, so for legacy reasons it could not be enabled by default. You can set UltraTree.ColumnSettings.AllowCellEdit property to 'Full' to enable cell editing.
Note that you must also set the UltraTree.Override.CellClickAction property in order for the cells to enter edit mode when the user clicks the cell.
Brian,
I have re-worked this suggestion as I think I was a little off-track in my thinking. Surely I can't do the above as there is no data structure available or indeed any underlying dataset in which I can store anything entered by the user.
Instead I have created a custom class with the required properties, and have loaded this into a BindingList. One of the properties of the custom class is a a further child bind list collection which enables me to recreate the hierarchy I am after. This can then be bound to the tree and databinding will then take over. I have manually created the columnsets, and I can now set the ViewStyle to "Grid" which is the format I require. As the user interacts with the grid, the object properties within the collection are updated and these can subsequently be read in code.
This works in the way I require.
Nick,
I'm glad you found your own solution. I will close this case. You can open it again if you need to within 30 days of its closure and you can always open a new case at any time.
Thank you for using Infragistics.
Michael S.