Hi:
I am using the following codes to read xml file to a datagridview in c#:
newDataSet.ReadXml(filepath);
dataGridView3.DataSource = newDataSet;
dataGridView3.DataMember = "aaa";
and my xml file is like this:
<root>
<aaa>
<Param_1>1</Param_1>
<Param_1>2</Param_1>
<Param_1>3</Param_1>
</aaa>
</root>
I can read the xml to dataset without any problems? Then I added some attributes to the Param nodes so it becomes
<Param_1 size="2">1</Param_1>
The Dataset can't show any xml data, Does anyone knows why?
Also if I change my xml file to something like:
<root>
<Data_1>
<Name>aaa</Name>
<Params>
<Param_1>1</Param_1>
<Param_1>2</Param_1>
<Param_1>3</Param_1>
</Params>
</Data_1>
</root>
Is there still possible to use DataSet method to read them into datagrideview or I have to use something like linq?
If I have to, Can someone show me how to do that using linq?