Preethi S

Preethi S

  • NA
  • 9
  • 33.6k

creating master detail treeview in wpf

Sep 11 2012 12:48 AM
I want to create a treeview from xml file.. My treeview will act as master,when user clicks any of the leaf node details about that node has to displayed in Grid and those details are present in xml file. I need help on how to fetch xml nodes based on treeviewitem.

my treeview looks as follows
--System1
        ---subsystem1
        ---subsystem2
--System2
        --subsystem1
        --subsystem2
        --subsytem3p
and so on..

my xml file
<NodeDetails>
<node name="System1">
<node name="subsystem1" id="6765"/>
<node name="subsystem2" id="6443"/>
</node>
<node name="System2">
<node name="subsystem1" id="8776"/>
<node name="subsystem2" id="8023"/>
<node name="subsystem2" id="9873"/>
</node>
...
</NodeDetails>


when user click on leafnode id should be displayed on detailgrid.