|
-
Apr 27th, 2013, 03:45 AM
#1
Thread Starter
Junior Member
[RESOLVED] XML file and Combobox
Good morning,
I am sitting in front of my first Visual Basic project. My intention is to create a small application reading values from an XML file.
My XML file
<?xml version="1.0" encoding="utf-8"?>
<Materialien>
<Material name="Aluminium">
<Dichte>2</Dichte>
<EModul>70000</EModul>
</Material>
.......
</Materialien>
My VB Code snippet
_dsData.ReadXml("C:\Material.xml")
ComboBox1.DataSource = _dsData.Tables("Material")
ComboBox1.DisplayMember = "name"
This is working perfectly and I can choose a material from the XML file. So if I choose "Aluminium" in the combobox I would like to write "Dichte" and "EModul" into variables. I want to use them inside some calculations or just display them as Label2 and Label3.
Any idea?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|