Is it possible to have Button column on a bound UltraTree?
If so how can this be done?
(I need it mainly for the parent row, but would be useful to know how to put it on children rows as well.)
thanks
Hi,
Do you want the cell to have the normal text area and a button? Or do you want the entire cell to be a button with nothing else?
For the former, you can use an editor.
For the latter, I don't think the tree has this functionality like the grid does. You might want to consider using WinGrid instead. If that's not an option, you could achieve this in a couple of different ways. One way would be to use a CreationFilter to fill the cell with a ButtonUIElement. The other way would be to use the UltraControlContainerEditor to put an actual button control in the cells.
UltraGrid... when I search for help/info on UltraTree I find most examples and info relating to UltraGrid. So perhaps I should be using UltraGrid. What are the differences? What I'm trying to do is display paren/child data, such as Invoices, where one can click on the parent and the children open up.
The UltraTree was originally a replacement for the Inbox TreeView control, but over the years it has had a lot of grid functionality added to it, such as DataBinding and column support. But the tree is still a more limited control.
As a general rule, I would use the tree for navigation or if you need to mimic a tree in Windows, such as Windows Explorer.
For data entry or to display more complex hierarchical data, you should use WinGrid. WinGrid has built-in support for buttons in the cells, as well as many other options. It have built-in filtering and summary functionality, as well as the ability to print or export the data. Sounds like the grid would be the better control for you to use in this case.
Is WinGrid part of the same Infragistic library? Would UltraGrid work the same ?
bocboc1 said: Is WinGrid part of the same Infragistic library?
Is WinGrid part of the same Infragistic library?
Yes, UltraWinGrid is included in NetAdvantage along with the tree and all of the other controls.
bocboc1 said:Would UltraGrid work the same ?
This question is a bit open-ended, so I'm not sure how to answer it. There are many difference between the grid and the tree, so using the grid would probably require a lot of your code to change.
If you want to put a button a cell of the tree along with some text, then you could use an Editor. What you would do is place an UltraTextEditor control on the form with the tree. Use the ButtonsRight collection on the UltraTextEditor to add a button to it. Then set the tree Column's EditorControl/EditorComponent (depending on which version you are using) to the UltraTextEditor.