Is it possible to host a tree control in the WinCombo dropdown? If so, how is that done?
Thanks for your help!Jim Honeycutt
Hi Jim,
You can put the tree into a dropdown, but not WinCombo.
What I would do is use UltraTextEditor. Use the ButtonsRight collection and add a DropDownEditorButton to it. Then set the Control property on the button to an UltraWinTree. And that's it - instant dropdown tree.
You're awesome, thanks Mike!
Jim
I'm not sure, then. Maybe it's a bug. You might try setting the BindingContext on the tree, anyway, and see if that helps. You might also try leaving the tree on the usercontrol (instead of on the dropdown) and see if it works there - just as a test.
Hi Mike,
Thank you for your fast reply :)
I am placing the tree control on the UserControl designer at design-time and I'm losing the data-binding features...
What I did in the designer was the following:
1- Add the UltraTextEditor;
2- Set the ButtonsRight property to DropDownEditorButton;
3- Add an UltraTree;
4- Set the Control property of the DropDownEditorButton to the tree.
Then, I exposed the tree so that all Tree's properties (including DataSource, DataMember, etc.) are available in the UserControl.
Now my problem is when I use the UserControl in an application. I try to set the DataSource property of the tree and the data is not loaded. When I click the DropDown button the tree is always empty...
Hi Pedro,
Are you placing the tree control on the UserControl designer at design-time? Or creating it at run-time? My guess is that you are creating the tree control at run-time in the code and you are never parenting it to the UserControl, so it has no BindingContext. So you probably just need to set the BindingContext of the tree to the BindingContext of the UserControl.
Hi Everyone,
This is exactly what I was looking for. But I'd like to build it in a user control making it available to be reused in my code.
I am exposing the Tree control as a property in the User Control so that I can have access to the Tree's properties.
Particularly, I'd like to be able to set the DataSource of the tree and have the tree binded to whatever I want.
Unfortunately, the databinding doesn't work. When I drag my user control to a form and set the Tree's datasource, the tree is always empty.
Do you have any idea how to maintain the data-binding capabilities in the tree?
Many thanks in advance.
Best Regards,
Pedro Rosas Silva