Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
WebDataTree node expand issue
posted

Hi, I am having issue in the webdata tree node expand issue , some times node is expanding, somes times it is not working , when nodes are added dynamically. I am using the Infragistics asp.net 10.3 control set - Is there any issue with this version of control?

aspx Code :

 <asp:UpdatePanel ID="upPanel" runat="server">
                <ContentTemplate>
                    <ig:webdatatree id="wdtFPBrowser" runat="server" height="95%" initialexpanddepth="0" EnableViewState="true"
                        initialdatabinddepth="0" enableajax="true" enableconnectorlines="True" stylesetname="Default">
                                    <DataBindings>
                                    </DataBindings>
                                    <AutoPostBackFlags NodeExpanded="On" />
                                    <AjaxIndicator BlockArea="Page" Location="MiddleCenter" RelativeToControl="False" />
                                </ig:webdatatree>
                </ContentTemplate>
            </asp:UpdatePanel>

 

Code behind: On node expand event - adding the child nodes dynamically,

 DataTable dt = getNodes("Sub Node ");
            if (dt != null)
            {
                if (dt.Rows.Count > 0)
                {
                    //Get all of the folders that the user can see at the parent level
                    DataTreeNode dtNode;
                    foreach (DataRow dr in dt.Rows )
                    {
                        dtNode = new DataTreeNode();
                        dtNode.Text = dr["Text"].ToString();
                        dtNode.Value = dr["Value"].ToString();
                        dtNode.IsEmptyParent = true;                       
                        e.Node.Nodes.Add(dtNode);
                    }
                }               
            }
            e.Node.Expanded = true;

 

Thanks