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

Treeview showing expander on nodes with no children

2 Answers 405 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 03 Jul 2013, 03:23 PM

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?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 04 Jul 2013, 10:01 AM
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.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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 >>
0
Jason
Top achievements
Rank 1
answered on 05 Jul 2013, 02:14 PM
Pavel,

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.

Thanks!
Jason
Tags
TreeView
Asked by
Jason
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Jason
Top achievements
Rank 1
Share this question
or