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
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