I have anUltraWebTree on a webpage and is linked to an xmldatasource. The webtree is populated correctly, but I want the webtree to have all its nodes exapanded when the webpage loads. How can I do this? I tried the following code in the Page_Load, but it didn't work.
protected void Page_Load(object sender, EventArgs e) { uwtreeTasks.ExpandAll(); }
Thanks,
John
Thanks to Dev Support, the ExpandAll works now. You have to put the ExpandAll in the NodeBound event handler.
In C#
protected void UltraWebTree1_NodeBound(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e) { this.UltraWebTree1.ExpandAll(); }
In aspx
<ig:WebSplitter ID="WebSplitter1" runat="server" Height="519px" Width="808px"> <Panes> <ig:SplitterPane runat="server" Size="200px"> <Template> <ignav:UltraWebTree ID="UltraWebTree1" runat="server" DataSourceID="XmlDataSource1" DefaultImage="" Indentation="20" AutoPostBack="True" OnNodeBound="UltraWebTree1_NodeBound"> <DataBindings> <ignav:NodeBinding DataMember="ParentTable" TargetUrlField="targetURL" TextField="name" /> <ignav:NodeBinding DataMember="BaseTable" TargetUrlField="targetURL" TextField="name" /> </DataBindings> </ignav:UltraWebTree> <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/App_Data/TXLTaskList.xml"></asp:XmlDataSource> </Template> </ig:SplitterPane> <ig:SplitterPane runat="server" Size="100%"> </ig:SplitterPane> </Panes> </ig:WebSplitter>
Hello,
I am trying to reproduce the issue with WebSpliter but I can`t observe described behavior. I believe at this point it is best to contact our Developer Support department directly - they can be reached at:http://es.infragistics.com/support/Please take a look at the picture below:
Thanks.
Hi Ivan,
I have the same setup that you're testing with. One thing I didn't mention in my initial question was my webtree is inside a websplitter. So I have a websplitter with 2 panes. The webtree is in one of the panes. Could this be causing the webtree to not expand?
I am trying to reproduce the issue, unfortunately to no avail. I use VS2008 SP1, NetAdvantage 8.3, Firefox 3, IE7 and Chrome. Please take a look at the picture below.What am I missing?