Help on TreeNode binding data ??

G

Guest

Dear all,

I ma collected data from a CSV file and build dataset based on those data.
I would like to bind this dataset to a treeview control in order that nodes
gets displayed automatically based on my dataset column name.

Does anyone could help me how to do this ?
Any sample will be appriciate

best regards
serge
 
I

Instant Baja

Vishnu-Chivukula said:
Hi serge,

As per my understanding, you cannot 'directly' bind a dataset to a
TreeView control. You might have to make an XML data source from the
Dataset, and then Data bind it.

That's sort of what I was working on today.

I wrote a web service that takes the result of a dataset from a DB2 database
and turns it to XML ( there's no native method for that ).

Then I return that XML as XmlNode from the web service.. and I iterate
through it with a recusive method ( from that MS article ) that adds a
treeview leaf for each XML node.


Of course I customize it quite a bit at the web service to turn some records
info into attributes and will do the same back on the treeview.
 
G

Guest

I forgot to mention that I am buidling windows application for the time beeing.
I am not any thing with web app or web service.
if I am binding my treenode to a xml datasource, I can sutomize my nodes
based on the field of my choice ?

or how toi do then

regard
serge
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top