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
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
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
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
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
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
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
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
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
Any updates on the above issue please.
Thanks
Raj
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
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
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
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.
Nikolay Tsenkov
the Telerik team
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
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?
Nikolay Tsenkov
the Telerik team