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

Speeding up my TreeList...

2 Answers 63 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 01 Dec 2011, 08:28 PM
I build a rather large multi-tier tree list that represents a large checklist. The original intent was to render the whole checklist and let the user scroll through as they complete. Each item in the tree list contains text, and one or more input's ( textbox, checkbox, radio). When a user completes the checklist item, they press the "Confirm" button within that tree list row.

My problem is, any post-back seems to rebuild the whole tree. What are my options, to rebuild just the items within the tree list row? I'm not against using a DetailTemplate and ditching the 'columns' of the list all together. For that matter, i'm open to Treeview.

If I wrap my item level controls in an UpdatePanel will that allow me a finer resolution during postback? Can I have an update panel within a Cell or DetailTemplate with a postback button that doesn't force the whole tree to postback?

One option is to not postback at all, and keep track of the state client-side until they click some master 'I'm done" button, but the worse case scenario there is every response is lost to an exception, power loss, or closing the browser window.

Any suggestions?

2 Answers, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 05 Dec 2011, 04:30 PM
Hi Frank,

You could try using the Load-on-Demand functionality of the TreeList demonstrated in the example below:
Additionally, you could try using as you mentioned DetailTemplate or TreeListTemplateColumn with ItemTemplate and manually retrieve and show the needed information. Note that on update this will require saving the values in a ViewState and retrieving them so the TreeList is updated accordingly. This approach will help skip the TreeList rebind and improve the performance.

Best wishes,
Antonio Stoilkov
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
Frank
Top achievements
Rank 1
answered on 06 Dec 2011, 07:54 PM
Thanks for the response. The Load on demand for TreeList still results in a complete rebuild of the tree control hierarchy. In the end I figured out I was forcing the tree to expand in PreRender, and not checking if this was Postback or not. So each postback of the control was causing the whole tree to rebind due to the ExpandToLevel. This was really the larger performance issue. It still isn't as fast as I would like on very large lists, but I don't want to handle a per item update panel to try and get more granular reloads. And for the purpose of this project, I have to keep the tree fully expanded. 

Thanks,
-Frank
Tags
TreeList
Asked by
Frank
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
Frank
Top achievements
Rank 1
Share this question
or