I want to programmatically bind an XML file containing some results pulled out from database to my Datagrid. My XML looks like:
<root>
<resultset>
<header>
<column> Col 1 </column>
<column> Col 2 </column>
</header>
<data>
<row>
<field>Value field 1</field>
<field>Value field 2</field>
</row>
<row>
<field>Value field 1</field>
<field>Value field 2</field>
</row>
</data>
</resultset>
</root>
I'm trying to map the header to the datagrid header, and the rows to the rows... The only thing is that I'm kinda stuck, I'm lost among the programmatic properties, could someone just give me a hint to what to look after?
I've tried doing:
myDataGrid.ItemsSource = myXmlDoc
But it doesn't really help nothing shows up hehe, I've read about some "path" binding property but I can't find it.