P
placek
Hi all.
I have a page with a TreeView control and a XmlDataSource. I set
XmlDataSource.Data property with some DataSet.GetXML() method and then
I programatically set TreeView.DataSourceId to my XmlDataSource. It
works fine, all data is properly displayed. One more thing: this
TreeView control is placed in WizardControl.
My problem starts when user clicks Next button in WizardControl. At
this moment I would like to retrieve underlying data of my TreeView
control. Unfortunately, TreeView.DataSource seems to be null.
I tried to store XmlDataSource.Data in Session at the moment, when data
is bound, but this approach is not good for me. The reason is that it
stores initial data values. In fact I need to retrieve current data
values. Why? Because user could for example (un)check some checkboxes
from TreeView and I would like to know about that. I know, that there
is a TreeView.CheckedNodes property, but I need to retrieve ALL
structure, not only changed nodes.
Is there some way to retrieve TreeView data, which is currently
displayed in browser?
My second problem is how to find some node in XML file, when I iterate
through TreeView.CheckedNodes collection. I know that there is a
GetElementById() method of XmlDocument, but I have no idea how to get
node id from some node.
Does anybody can help me?
Thanks in advance,
misiek.
I have a page with a TreeView control and a XmlDataSource. I set
XmlDataSource.Data property with some DataSet.GetXML() method and then
I programatically set TreeView.DataSourceId to my XmlDataSource. It
works fine, all data is properly displayed. One more thing: this
TreeView control is placed in WizardControl.
My problem starts when user clicks Next button in WizardControl. At
this moment I would like to retrieve underlying data of my TreeView
control. Unfortunately, TreeView.DataSource seems to be null.
I tried to store XmlDataSource.Data in Session at the moment, when data
is bound, but this approach is not good for me. The reason is that it
stores initial data values. In fact I need to retrieve current data
values. Why? Because user could for example (un)check some checkboxes
from TreeView and I would like to know about that. I know, that there
is a TreeView.CheckedNodes property, but I need to retrieve ALL
structure, not only changed nodes.
Is there some way to retrieve TreeView data, which is currently
displayed in browser?
My second problem is how to find some node in XML file, when I iterate
through TreeView.CheckedNodes collection. I know that there is a
GetElementById() method of XmlDocument, but I have no idea how to get
node id from some node.
Does anybody can help me?
Thanks in advance,
misiek.