This is a migrated thread and some comments may be shown as answers.

Rad treeview problem

16 Answers 141 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Srinivasa Rao Ranga
Top achievements
Rank 1
Srinivasa Rao Ranga asked on 19 Aug 2010, 01:00 PM
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 

16 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 19 Aug 2010, 04:39 PM
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
0
Srinivasa Rao Ranga
Top achievements
Rank 1
answered on 31 Aug 2010, 11:42 AM
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

0
Veronica
Telerik team
answered on 06 Sep 2010, 09:26 AM
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
0
Srinivasa Rao Ranga
Top achievements
Rank 1
answered on 16 Sep 2010, 11:44 AM

 
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

0
Veronica
Telerik team
answered on 22 Sep 2010, 09:20 AM
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
0
Srinivasa Rao Ranga
Top achievements
Rank 1
answered on 24 Sep 2010, 06:42 AM
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
0
Veronica
Telerik team
answered on 28 Sep 2010, 10:20 AM
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
0
Srinivasa Rao Ranga
Top achievements
Rank 1
answered on 19 Oct 2010, 07:22 AM
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
0
Srinivasa Rao Ranga
Top achievements
Rank 1
answered on 25 Oct 2010, 01:10 PM
Hi Team,

Any updates on the above issue please.

Thanks
Raj
0
Veronica
Telerik team
answered on 25 Oct 2010, 01:42 PM
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
0
AM
Top achievements
Rank 1
answered on 19 Nov 2010, 03:45 PM
I'm facing the same issue as above. Please let me know if LoadOnDemand for the above code is solved?
0
Veronica
Telerik team
answered on 26 Nov 2010, 09:17 AM
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.
0
visu
Top achievements
Rank 1
answered on 01 Dec 2011, 08:56 AM
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
0
Nikolay Tsenkov
Telerik team
answered on 06 Dec 2011, 12:30 PM
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
0
visu
Top achievements
Rank 1
answered on 09 Dec 2011, 07:32 AM
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
0
Nikolay Tsenkov
Telerik team
answered on 12 Dec 2011, 09:25 AM
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
Tags
General Discussions
Asked by
Srinivasa Rao Ranga
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Srinivasa Rao Ranga
Top achievements
Rank 1
AM
Top achievements
Rank 1
visu
Top achievements
Rank 1
Nikolay Tsenkov
Telerik team
Share this question
or