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

Server side load treeview takes loads of time to render

1 Answer 119 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Aayam
Top achievements
Rank 1
Aayam asked on 14 Jan 2009, 02:27 PM
Hi,

I have created a rad treeview (2008.2.723.35) which is fully populated at server side with 1500 nodes approx.
The checkboxes are enabled for the nodes.
Now when i try to load this control on the page it takes hell of time.
I can't make the treeview load on demand as there is one one level in the treeview.
I have also seen that there is a javacript emebbeded in the html of page attached with the Page initialization at client side.
This javascript contains the JSON object of individual nodes.
What i think is that server side actually send the JSON object from server side and create a javascript with these JSON object and links it with client side Page Initialization.When the client side event takes place then this javascript is fired which picks up the JSON object and creates the Rad node at client side and renders them on the page.
If not then can anyone help me how this works and what can be possible solution to resolve this issue.

One more thing i can see the page loading faster in Firefox so i am assuming  that there is some issue in jvascript of Rad treeview.But our client has only IE 7.
Please help me regarding this issue and provide me with some insight of how the nodes are rendered for rad treeview on html side.

Regards,
Aayam Singh

1 Answer, 1 is accepted

Sort by
0
Aayam
Top achievements
Rank 1
answered on 15 Jan 2009, 09:47 AM
Hi,

I just checked out the HTML page to get the javascript embedded into  the HTML.

Telerik.Web.UI.RadTreeView._preInitialize("radTreeview1","0");Sys.Application.initialize();

WebForm_InitCallback();Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadTreeView, {"_checkBoxes":true,"_postBackOnExpand":true,"_postBackReference":"__doPostBack(\USERControl$radTreeview\u0027,\u0027arguments\u0027)","_scrollPosition":0,"_skin":"Default","_uniqueId":"USERControl$radTreeview","checkedIndexes":["0","0:0","0:1"],"clientStateFieldID":"USERControl_radTreeview_ClientState","collapseAnimation":"{\"type\":12,\"duration\":100}","expandAnimation":"{\"duration\":100}","nodeData":[{"expanded":1,"checked":1,"items":[{"value":"05848202-b84f-45b8-93ae-61db11385a77","checked":1,"expandMode":3,"attributes":{"CategorySet":"false"}},{"value":"376a5703-056c-4607-9bf5-deeca0958425","checked":1,"attributes":{"CategorySet":"false"}}],"category":"True"}],"persistLoadOnDemandNodes":false,"webServiceSettings":"{\"path\":\"/MyWebService.asmx\",\"method\":\"getChildBrands\"}"}, {"nodeChecked":AfterCheckBrands,"nodeChecking":BeforeCheck,"nodePopulated":AfterToggle,"nodePopulating":BeforeExpand}, null, $get("USERControl_radTreeview"));
});

If my treeview is completely constructed at server side when the page is loading for the first time then i suppose  there should be only DIV tags to contruct my treeview.
But consider this script for 1500 nodes.It addes  a lot to the page size and  i am not using any ajax feature for the treeview.
Is there a way i can change the rad treeview to be sever control rather than ajax based server control.


Regards,
Aayam Singh
Tags
TreeView
Asked by
Aayam
Top achievements
Rank 1
Answers by
Aayam
Top achievements
Rank 1
Share this question
or