Treeview showing expander on nodes with no children

3 posts, 0 answers
  1. Jason
    Jason avatar
    10 posts
    Member since:
    May 2008

    Posted 03 Jul 2013 Link to this post

    I have a TreeView that is bound to a list of objects.  It works great but I have noticed that the expander displays on nodes which have no children.  The best way to describe this is via the screen shots.

    Expandall.jpg:  This is how it looks if I call ExpandAll() after binding to the TreeView.  This is how I would expect it to work.  I need to start with the TreeView collapsed, however, due to requirements.

    TreeViewInitialLoad.jpg:  Same TreeView loaded but without ExpandAll() being called.  Notice that all of the nodes have the expander icon.

    TreeViewMiscFolderExpanded.jpg:  I expanded the "Misc" folder.  Notice that the expander icon on the folders are correct, but the items under the "Misc" folder incorrectly show the expander.

    TreeViewMiscFolder2.jpg:  I collapsed the "Misc" folder and then expanded it again.  The child nodes now show correctly.  This is what I would expect the first time I expand the folder.

    I hope this helps describe what I am seeing.  Any thoughts on this?


  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1165 posts

    Posted 04 Jul 2013 Link to this post

    Hi Jason,

    I am not sure that I fully understand your scenario. However, the RadTreeView control visualizes the expander icons in the front of each RadTreeViewItem when you use the LoadOnDemand feature of the control. If you have implemented it, then it is expected that the expander can be seen in front of items that have no children.

    If you have not implemented the LoadOnDemand feature, we will need to take a look at your current implementation to make further suggestions. It will be best if you can reproduce the reported behavior in a separate project and send it over through our support ticketing system. By doing this we will be able to further investigate the reasons behind this behavior.

    Thank you for understanding us.

    Pavel R. Pavlov
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft R3 2016 release webinar banner
  4. Jason
    Jason avatar
    10 posts
    Member since:
    May 2008

    Posted 05 Jul 2013 Link to this post


    Thanks for your response.  What you said makes sense now.  I did have the LoadOnDemand turned on at the TreeView level.  I updated my code to turn off LoadOnDemand at the tree level and enabled it at the Item level instead.  From a timing perspective I used the ItemPrepared event to help me get the items set correctly.  The TreeView is now working as I expect.

Back to Top