I am trying to display a WebDataTree (attached to a self-referencing WebHierarchicalDataSource) within a WebDropDownControl.
Can someone provide a simple example that includes accessing the selected value in the tree?
All my efforts using Templates, etc., either show multiple trees, 1 tree with scripting error when a node is expanded, or no tree.
Thanks in advance
Paul
Hi Paul,
This seems this is a bug in the WebDataTree. In general the way to implement this scenario is to have 1 dropdown item, and put an item template, and have the WebDataTree declared inside it. Due to specific markup structure surrounding the template code, the tree fails to operate correctly.
I have submitted a bug for this, and we will address it ASAP. You can probably expect the fix in the first 2009.1 hotfix.
Thanks for your feedback,
Angel
Hello can you send simplesample as is for WebDataGrid in Templating the WebDropDown container but done for WebDataTree ?
I have tried to do the same as in Templating the WebDropDown container for WebDataGrid sample but for WebDataTree, with no success. In the HeaderTemplate the tree was shown fine but not able any client side events fired, in the ItemTemplate some internal javascripts objects have null values, ...
Thanks
Mike
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,
I can't get neither to work. The designer removes the reference everytime. I tried using the DropdownItem's Template tag as well as the dropdown's Itemtemplate tag to reference the UltraTreeView HTML. No luck.