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
504
Ultrawebtree NodeCliecked does not fire in case of DemandLoad event and tree disapperas from the ASPX page
posted

Hi,

 

I am trying to use the DemandLoad event using the basic Tree with EnableViewState set to false and LoadOnDemand set to ManualSmartCallbacks. (This requirement for load on demand i read on your site, if i set the EnableViewState to TRUE then everything works good)

 

<ignav:UltraWebTree ID="UltraWebTree1" runat="server" Height="197px"
                                         LoadOnDemand="ManualSmartCallbacks"
                        EnableViewState="false" AutoPostBack="true" ondemandload="UltraWebTree1_DemandLoad"
                        onnodeclicked="UltraWebTree1_NodeClicked" >
                    </ignav:UltraWebTree>

 

and following code load the nodes on demand

 

 protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            UltraWebTree1.Nodes.Add("Rajan").ShowExpand = true;
           }
    }
    protected void UltraWebTree1_DemandLoad(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e)
    {
        if (Page.IsPostBack)
        {
            Random rand = new Random();
            int nextRandom = rand.Next(12);

            for (int i = 0; i <= nextRandom; i++)
            {
                Node newNode = new Node();
                newNode.Text = "NewNode" + i;
                newNode.LoadOnDemand = true;
                e.Node.Nodes.Add(newNode);
                UltraWebTree1.Nodes.Add(e.Node).ShowExpand = true;
            }
           
        }
    }

 

Parents Reply Children