Per a previous thread, it was suggested to use put the UltraTreeView control within the WebDropdown control's ItemTemplate tag. Visual Studio 2008 removes the reference from the designer. If manually put in, the control is NULL. If I copy the markup outside of the WebDropDown, the reference within the designer is added and the control works as expected.
I have a need for the TreeView control to be in either a dropdown or a combobox type control. Is this possible? Please provide a sample so I can implement within my proof-of-concept.
Thanks.
This code does not work for me. It'sthe same exact problem as described above:
The control is not referenced within the designer
Clicking on the dropdown control's button doesn't do anything
What version of Visual Studio / .NET Framework are you using? I am using VS2008 SP1 and Framework 3.5. The markup is within a user control.
Hi,
Here is the code that will embed an UltraWebTree inside the DropDown's container. Note that you can further improve this example by removing hover/selected style for the dropdown item (so that you don't get any color change while you manipulate the actual Ultra Web Tree). Also you can turn off EnableClosingDropDownOnSelect=false, so that the dropdown doesn't close when you manipulate the UltraWebTree. From there on, you can set / get values from the ultra web tree to the dropdown using client-side events, as it is shown in the WebDataGrid template sample in the WebDropDown 2009.1 samples.
Also note there is only 1 DropDown item in the items collection, because if you have more, it will create an instance of the UltraWebTree for every item, so you will get many UltraWebTrees rendered one after another in the DropDown container.
<ig:WebDropDown runat="server" ID="WebDropDown2" Width="200px">
<Items>
<ig:DropDownItem Text="something"></ig:DropDownItem>
</Items>
<ItemTemplate>
<ignav:UltraWebTree ID="UltraWebTree1" runat="server">
<Nodes>
<ignav:Node Text="Root 1">
<ignav:Node Text="Child 1"></ignav:Node>
<ignav:Node Text="Child 2"></ignav:Node>
<ignav:Node Text="Child 3"></ignav:Node>
</Nodes>
</ignav:Node>
<ignav:Node Text="Root 2"></ignav:Node>
<ignav:Node Text="Root 3"></ignav:Node>
</ignav:UltraWebTree>
</ItemTemplate>
</ig:WebDropDown>
Hope it helps,
Angel