create raddropdowntree in cs file and load data to it using LoadOnDemand method. Error while expanding parent : 'There was an error in the callback'

2 posts, 0 answers
  1. umesh
    umesh avatar
    2 posts
    Member since:
    Aug 2017

    Posted 06 Aug 2018 Link to this post

    Hi, i have requirement to add Raddropdowntree programmatically to form. Also i am using Load on Demand approach to load data to raddropdowntree because i have more that 40,000 rows of data from sql server. 

    but i have a problem here if i hardcode raddropdowntree control in aspx page then load on demand works fine (i have copied that code from user 'Boyan Dimitrov' from telerik forum).

    If i am creating raddropdown programmatically in .cs file (see the below code) then that code gives a error 'There was an error in the callback' when i try to expand any parent node.



    RadDropDownTree datatreeview = new RadDropDownTree();
    datatreeview.ID = raddptreename;
    datatreeview.Attributes["CssClass"] = "radwidth";
    datatreeview.Attributes["runat"] = "server";
    datatreeview.Attributes["OnLoad"] = "RadDropDownTree1_Load";
    datatreeview.EmbeddedTree.NodeExpand += embeddedTree_NodeExpand;
    form1.Controls.Add(datatreeview);
    loadtreeview(RadDropDownTree1, TreeNodeExpandMode.ServerSideCallBack);


    Please guide me in fixing this problem.
     

  2. Tsvetomir
    Admin
    Tsvetomir avatar
    793 posts

    Posted 09 Aug 2018 Link to this post

    Hi Umesh,

    A response to this question has already been given in the following article: RadDropDownTree Forum Post. I suggest that we continue our technical conversation on the mentioned thread.

    Regards,
    Tsvetomir
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top