Home | Index | Dotnet4all Snippets | Submit resources
About | Mail us 





XML in a combobox (Tuesday, January 03, 2006)



Found the following interesting discussion in the Newsgroups:

XML in a combobox
by:alex5772@hotmail-dot-com.no-spam.invalid (tureypr)

Hello Wolrd!

I'm trying to add items. to a comboox from a XML file,

I want to add the parents elements to thre combobox and when you
select an item in the combobox, in a another combobox display the
child elements of the parent element selected.

pleae someone help me


 Reply:
by:One Handed Man \( OHM - Terry Burns \)

 Hi you can create a new DataSet object and real in your data from an XML
file, then you can bind the DataSource and DataMember and DataValue
properties of the combobox to your DataSet.

HTH - OHM
--

OHM ( Terry Burns )


 Reply:
by:hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])

 

The solution depends on how data is stored in the XML file. Can you
post a sample?

In some cases, the solution posted in the other reply will be the way to
go, in more complicated cases you will have to use classes from the
'System.Xml' namespace ('XmlDocument' etc.).

--
Herfried K. Wagner [MVP]



Posted by Xander Zelders



0 Comments:

Post a Comment

<< Home

 
Previous Posts
    - Setup Project
    - WMI Com Interop exception handling
    - Problem With Mailto Start Process
    - Comboboxes in windows forms datagrid
    - Sometimes I want to skip a page - How to do that
    - FxCop Error on command button
    - How to scroll down on listView (programmatically)
    - Open a file save as byte
    - How to add a property to an inherited tool?
    - Retrieve Domain Names



Disclaimer & Terms of Use | DotNet4All.Com concept & © 2004 - 2007 by Zelders² - Holland