|
-
May 15th, 2007, 01:51 AM
#1
Thread Starter
Junior Member
manipulating an XML
<?xml version="1.0" ?>
- <Aparate>
- <Aparat>
<Denumire>AF MARINCA SAECO 1P</Denumire>
<NumarCitire>156</NumarCitire>
<DataCitire>31.10.2007</DataCitire>
<ContorGeneralInitial>817</ContorGeneralInitial>
<ContorGeneralFinal />
- <Pozitii>
- <Pozitie>
<Produs>Cafea espress</Produs>
<ContorInitial>817</ContorInitial>
<ContorFinal />
</Pozitie>
- <Pozitie>
<Produs>Cafea cu lapte</Produs>
<ContorInitial>317</ContorInitial>
<ContorFinal />
</Pozitie>
</Pozitii>
<Denumire>LAVAZZA</Denumire>
<NumarCitire>112</NumarCitire>
<DataCitire>31.10.2007</DataCitire>
<ContorGeneralInitial>144</ContorGeneralInitial>
<ContorGeneralFinal />
- <Pozitii>
- <Pozitie>
<Produs>Cafea espress</Produs>
<ContorInitial>817</ContorInitial>
<ContorFinal />
</Pozitie>
- <Pozitie>
<Produs>Cafea cu lapte</Produs>
<ContorInitial>317</ContorInitial>
<ContorFinal />
</Pozitie>
- <Pozitie>
<Produs>Capucino</Produs>
<ContorInitial>123</ContorInitial>
<ContorFinal />
</Pozitie>
</Pozitii>
</Aparat>
</Aparate>
i put in a combo Denumire.So i have 2 items in the combo
Now,how can i ,when i select from the combo one of the 2 itmes,put in a grid the right data?
the code i use to insert items in combo is this
XmlDocument xd = new XmlDocument();
xd.Load("contor.xml");
XmlNodeList xnd = xd.SelectNodes(@"Aparate/Aparat/Denumire");
foreach (XmlNode xn in xnd)
{
string sDenumire = xn.InnerText;
this.comboBox1.Items.Add(sDenumire);
}
Last edited by King Abadon; May 15th, 2007 at 04:32 AM.
-
May 16th, 2007, 09:30 PM
#2
Hyperactive Member
Re: manipulating an XML
How about creating an event handle with the combo box, when it is clicked, retrive the values, and take those values and add it to the grid.
The combo box has a lmethod for retrieving the data selected.
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
|