I have an XML file with the following layout:
I use this code to read the XML file:
|
However, I only get the following columns in the datagridview:
item1
item2
but I would like to see:
item1
item2
info1
info2
What am I doing wrong?
Thanks in advance.
|
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suthish NairPosted Feb 7, 2011, 5:54 AM
Dynamically creation of DataTable will help you to create the DataSource.
As per given example you need four columns.
For that you need seprate logic to retrive xml nodes and create DataTable.
refer blog: Different ways of reading an XML file
JRPosted Feb 6, 2011, 3:38 PM
Is this because the "info" is read into another table? if yes, is there a way to add it the content to the other rows (by adding columns)?
Thanks in advance for all the advice!
Cheers.
Liutauras MedziunasPosted Feb 6, 2011, 1:03 PM