Speeding up my TreeList...

3 posts, 0 answers
  1. Frank
    Frank avatar
    10 posts
    Member since:
    Oct 2011

    Posted 01 Dec 2011 Link to this post

    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. Antonio Stoilkov
    Antonio Stoilkov avatar
    530 posts

    Posted 05 Dec 2011 Link to this post

    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
  3. Frank
    Frank avatar
    10 posts
    Member since:
    Oct 2011

    Posted 06 Dec 2011 Link to this post

    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. 

Back to Top