DataGrid Appearance

  • Thread starter Thread starter Jeff Cook
  • Start date Start date
J

Jeff Cook

Here's another newbie question.

I've written a little module to read a XML file and display it in a
DataGrid.

My code looks like this:-

if(openFileDialog1.ShowDialog() == DialogResult.OK)

{

ds.ReadXml(openFileDialog1.FileName);

grdXML.DataSource = ds;

}

}

This works OK. But when it runs I get a little tree view in the top left
corner which expands to:-

DATAPACKET, METADATA, FIELDS, FIELD, PARAMS, ROWDATA, ROW

If I click on ROW, I get what I want. Question is ... how do I do that in
code, so the user doesn't have to do the clicking through a tree.

Also, what if the bottom level item isn't called ROW - say it is called
CUSTOMER - then how do I, in code, open the bottom level item without
knowing its name in advance.



Cheers

Jeff
 
Hi

I asked this question a few days ago and either

1. It was a dumb question unworthy of answering!
2. The question is poorly phrased and no one understood it

or ( more likely)

3. I missed the answer

Here's hoping for a reply

Cheers

Jeff
 
Back
Top