Rad treeview problem

17 posts, 0 answers
  1. Srinivasa Rao Ranga
    Srinivasa Rao  Ranga avatar
    20 posts
    Member since:
    May 2010

    Posted 19 Aug 2010 Link to this post

    Hi,

         We are facing a problem with the rad treeview. We are binding treeview from a hierarchy datatable from the database. Rad treeview is not binding when the data table has more that 1200 records. This is very strange.

         Please let me know we need set some property to accept large data to the treeview.

    Thanks
    Raj 
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 19 Aug 2010 Link to this post

    Hello Raj,

    No. there is no limitation for the records which the RadTreeView can have.

    Have you used the Load-On-Demand technique? Large amount of data will cause the TreeView to run slow  when not binded with Load-On-Demand.

    Please take a look at this help topic for optimizing the RadTreeView Performance.

    Greetings,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Srinivasa Rao Ranga
    Srinivasa Rao  Ranga avatar
    20 posts
    Member since:
    May 2010

    Posted 31 Aug 2010 Link to this post

    Hi,

    I have a treeview with 5500 nodes. When i use the below line it is taking 6 to 10 minutes to perform the opertion. I beleive it is because of view state. When i disable the viewstate for the contol it is not working.  

    radTreeView.ClearCheckedNodes();

    For all operations like populating nodes and saving node details and others are taking same amount of time because of viewstate.

    Please let me know how i can increase the performance of this.

    Thanks,
    Raj

  4. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 06 Sep 2010 Link to this post

    Hi Srinivasa,

    Thank you for the detailed information about the problem. However it is not enough to help us to reproduce the issue. Could you please send us the full code so we can inspect it and help you.

    In the ticket info I see you are using version 2010.2 713. Can you confirm this?


    Kind regards,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Srinivasa Rao Ranga
    Srinivasa Rao  Ranga avatar
    20 posts
    Member since:
    May 2010

    Posted 16 Sep 2010 Link to this post

     
    Hi,
        We are using 2010.1.415.35 version.
       Please download the sample project from the link http://www.sendspace.com/file/u8hw67. To run this projects you have to run the sql script (TreeviewData.sql) which is available in the downloads, which can create a sql hierarchy table.

     In btnClick_Click event GetData = GetAllPermissionXml(node).ToString(); will give me an xml with all nodes wheter the nodes are check or not pluse some other bussiness requirement.

    Please note that the sql table is having more that 5000 rows.

    Now that problems is, as the table is having more data it is taking time for the following things.
    1. Binding the data to treeview during the page load
    2. checking the first parent node to check all other nodes.
    3. After clicking on the save button it is taking more time.
     
    I feel that the above problems are because of view state, As the treeview is have more data the view state is generation evey time.

    Please respond me asap as this is very important and urgent for me to complete this.

    I hope i have provided enough details to resolve this.

    Thanks,
    Raj

  6. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 22 Sep 2010 Link to this post

    Hi Srinivasa Rao Ranga,

    Thank you for the project. The main problem is that all nodes are loaded at once in your case.  

    To be able to achieve a best performance you'll need to use Web Service Load On Demand. That way nodes will be loaded on parts. Please take a look at this demo. Also note that the TreeStateCheckboxes functionality also causes the TreeView to run slow. The reason is that it needs time to check the state of each checkbox to determine the state of the Parent. You can remove this for better performance.

    Please accept my apologies for the late reply and let me know if this helps.

    Greetings,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Srinivasa Rao Ranga
    Srinivasa Rao  Ranga avatar
    20 posts
    Member since:
    May 2010

    Posted 24 Sep 2010 Link to this post

    Hi,

       Thanks for the reply. If i load nodes Web Service Load On Demand then how we get the check status of all nodes if the user check's the parent check box with out expanding the nodes.
     
    Thanks,
    Raj
  8. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 28 Sep 2010 Link to this post

    Hi Srinivasa Rao Ranga,

    Please take a look at this help toic for "Inherit  the Checked state of the parent Node when loading Nodes on demand" - client-side approach.

    All the best,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Srinivasa Rao Ranga
    Srinivasa Rao  Ranga avatar
    20 posts
    Member since:
    May 2010

    Posted 19 Oct 2010 Link to this post

    I want to implement load on deman for rad tree view. Below is the existing code. I have already sent you a sample project.

    protected void Page_Load(object sender, EventArgs e)
            {   
    DataSet dataset = new DataSet();
    //GetTreeViewData() will get a dataset from a hyrarchy table.
                            dataset = objuseradmin.GetTreeViewData();
                            dataset.Tables[0].Columns.Add("ElementID", typeof(SqlHierarchyId));
                            foreach (DataRow oRow in dataset.Tables[0].Rows)
                            {
                                //convert the string back into a hierarchyid
                                oRow["ElementID"] = SqlHierarchyId.Parse((string)oRow["UM_Hierarchy_ID"]);
                            }
                            LoadTreeSQLHierarchy(radTreeFunctionality, dataset.Tables[0], "ElementID", "UM_CODE");
                       }
      
     private void LoadTreeSQLHierarchy(RadTreeView oTV, DataTable oTable, string sKeyField, string sTextField)
            {
      
                    oTV.Nodes.Clear();
                    //TreeNode oNode;
                    RadTreeNode oNode;
                    //get an empty id to get the top node
                    SqlHierarchyId iID = new SqlHierarchyId();
                    EnumerableRowCollection<DataRow> query = from TNodes in oTable.AsEnumerable()
                                                             where TNodes.Field<SqlHierarchyId>(sKeyField).GetAncestor(1).Equals(iID)
                                                             select TNodes;
                    DataView oDV = query.AsDataView();
                    if (oDV.Count == 1)
                    {
                        //load up a node
                        oNode = new RadTreeNode(oDV[0][sTextField].ToString());
                        //put the datarow into the tag property
                        datatableRow = oDV[0].Row;
                        //load up the children
                        LoadNodeSQLHierarchy(oNode, oTable);
                        //add the node hierarchy to the tree
                        oTV.Nodes.Add(oNode);
                    }
    }


    Please send necessary changes to implement load on demand.

    thanks,
    Raj
  10. Srinivasa Rao Ranga
    Srinivasa Rao  Ranga avatar
    20 posts
    Member since:
    May 2010

    Posted 25 Oct 2010 Link to this post

    Hi Team,

    Any updates on the above issue please.

    Thanks
    Raj
  11. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 25 Oct 2010 Link to this post

    Hi Srinivasa Rao Ranga,

    Please accept my apologies for the late reply.
    I'll need more time to edit your project.. You'll be informed as soon as possible when I am ready.

    Thank you for your patience.

    All the best,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. AM
    AM avatar
    17 posts
    Member since:
    Mar 2010

    Posted 19 Nov 2010 Link to this post

    I'm facing the same issue as above. Please let me know if LoadOnDemand for the above code is solved?
  13. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 26 Nov 2010 Link to this post

    Hello AM,

    Could you please send me the full code you are using so I can inspect it and help you?

    Thank you!

    Kind regards,
    Veronica Milcheva
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  14. visu
    visu avatar
    1 posts
    Member since:
    Sep 2011

    Posted 01 Dec 2011 Link to this post

    Hi veronica,


                   I added a rad treeview control in my sharepoint site it is working fine.
    But when i scanned with a tool it is giving information that

    Injected item: POST: ctl00%24PlaceHolderMain%24NavigatorTreeView1%24ctl01%24TreeViewID_scroll
    Injected item: POST: __EVENTVALIDATION

    What would be the reason behind this.



    Regards
    -----------------
    visu
  15. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 06 Dec 2011 Link to this post

    Hello Visu,

    Could you, please, be a bit more specific on what exactly is the issue you are currently facing?

    As much as I understood, you are testing your project with a 3rd party tool which indicates some problems with RadTreeView.

    Please, provide more detail.

    Regards,
    Nikolay Tsenkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  16. visu
    visu avatar
    1 posts
    Member since:
    Sep 2011

    Posted 09 Dec 2011 Link to this post

    Hi vironica,

    Thanks for your reply.         
    yes what you said is correct. i tested with third party tool.
     i have one.aspx page in that page i added only one control that is tree view.
    Then i run my third party tool to test page security, then i got this message.


    Regards
    ------------
    visu
  17. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 12 Dec 2011 Link to this post

    Hi Visu,

    Could you, please, specify what is the tool you use and point me to some of its documentation so I can learn how to use it and repeat your tests?

    Regards,
    Nikolay Tsenkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!