on demand loading - refresh and keeping state of treenodw

4 posts, 0 answers
  1. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 15 May 2011 Link to this post

    Hi,

    in my app, I sometimes have to reload an unbound treeview because the underlying data changes. Now it would be nice to keep the state of the tree view (selected nodes, expanded state etc.) What's a good strategy to implement this?
    I do have object identity information in an object in the Tag attribute, so I can find the logically identical nodes after a reload.
    Thinking of maintaining maps of selected and expanded nodes so I can re-apply those attributes after reload. Is that a good idea?

    I'm using demand loading for non-root nodes. Also I have to take into account, that there might be some nodes missing or additional nodes appearing at reload.
    Has anybody implemented something similar?

    Regards
    Erwin
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 18 May 2011 Link to this post

    Hi Erwin,

    Thank you for this question. Yes, I can confirm that the solution to use maps (Dictionary or Hashtable collections) to keep your tree view settings is the best solution in this scenario. If you have any additional questions regarding this issue, I will be glad to help.

    Greetings,
    Julian Benkov
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 18 May 2011 Link to this post

    Thanks Julian!
    Implemented something in that direction but am stuck with another bug in RadTreeView: BringIntoView does not work for multi-selection TreeViews.

    Regards
    Erwin
  5. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 23 May 2011 Link to this post

    Hi Erwin,

    As I said in your previous ticket, the issue is logged in our issue tracking system and it will be addressed in our upcoming release - Q2 2011. I hope this is not too late for you. 

    Regards, Julian Benkov
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Back to Top