Hi, I need to populate a DataGridView conditionally. The data comes from one XML file, e.g.
<?xml version="1.0" standalone="yes"?>
<people>
<person>
<name>Bob</name>
<dogs>
<dog><name>Rover</name></dog>
<dog><name>Rex</name></dog>
</dogs>
</person>
<person>
<name>Jim</name>
<dogs>
<dog><name>Duke</name></dog>
<dog><name>Colin</name></dog>
<dog><name>Gnasher</name></dog>
</dogs>
</person>
</people>
If I use the following code I can show all dogs in the DataGridView - but I need to restrict the list to those owned by specific people.
DataSet ds = new DataSet();
ds.ReadXml("data.xml");
dataGridView1.DataSource = ds;
dataGridView1.DataMember = "dog";
How do I do this?
Thanks Stuart