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

Expand Icon when IsLoadOnDemandEnabled is set

1 Answer 22 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
gans
Top achievements
Rank 1
gans asked on 11 Feb 2012, 05:06 AM
I have set the  IsLoadOnDemandEnabled  to True at the Tree level and it makes all the node's images to show like, it has children nodes to be loaded. 

In Reality, not all of the nodes are Expandable. 

Lets for example say, I need to expand first level to dynamically load the next level. In the next level of nodes, some of them may have children nodes to be loaded when you click on them dynamically and some of the nodes are already the leaf nodes, meaning they are the last node and they don't have any child node. For these leaf nodes, I don't want the Image of the node to show as Expandable. 

Only the nodes that have children nodes to be loaded need to have the Expandable icon. 

How do I handle this situation. Its misleading when you show the Expandable icon or + icon for all the nodes irrespective of whether they are the last node or not. 

Please let me know if I am making sense. 




1 Answer, 1 is accepted

Sort by
0
gans
Top achievements
Rank 1
answered on 13 Feb 2012, 02:50 PM
Found the answer.  Set IsLoadOnDemandEnabled = false on the nodes that I don't want the Expander Icon to show from the ItemPrepared event. 


Tags
TreeView
Asked by
gans
Top achievements
Rank 1
Answers by
gans
Top achievements
Rank 1
Share this question
or