Home All Groups Group Topic Archive Search About

XmlDataDocument as a datasource for combobox?

Author
2 Nov 2006 3:36 PM
Dustin Davis
I have an XmlDataDocument. How do I go about converting this to
something I can use as a datasource for a combobox?

Author
2 Nov 2006 6:00 PM
BK
Dustin Davis wrote:
> I have an XmlDataDocument. How do I go about converting this to
> something I can use as a datasource for a combobox?

You don't have to convert it to anything.  Create a dataset with the
same structure as the xml data.  Bind the combobox to the dataset.  In
the form load (or whereever you want to populate the combobox), enter
something like:

Me.MyDataSet.ReadXml("SomeData.xml")

where MyDataSet is the dataset you created and SomeData.xml is the xml
data file.