what exactly is the problem, are you not able to assign to dataProvider?
if ur XML structure looks like this - <locations><Location><LocationName>..</LocationName><LocationCode>..</LocationCode>...</L ocation>..<Location>...</Location>... </locations>
And ur DG displays the various columns of the Location XML
The your dg.dataProvider will be locations.Location
and the dataField for the different columns will be the individual nodes like LocationName, LocationCode etc.
Hope this sorts it.
Morning. Sorry. It seems I said a lot but didn't explain very well. My fault
Thank you both for your replies. I think I should have explained from the point of view of the app actually running.
So imagine you run the app in your browser, and you see one datagrid, and one drop down box. Inside the drop down is a choice of XML files. Selecting XML file 1, will display the XML1's info in the datagrid. Selecting XML2 will display XML2's info in the datagrid and so on.
It's creating that drop down that allows me to select XML files for the datagrid to use while the app is running that is my stumbling block.
I'm familiar with the XML structure and how to display the info correctly inside the datagrid if the XML file is static.
I am however unsure how to go about being able to select an alternative XML file for the grid to use while the app is running - this is what I'd like to find out how to learn.
All the best,
Use Httpservice to load xml files at runtime and set the dataprovider in the result handler of the HttpService. Once an xml is loaded, save it an array or Dictionary so that the second time the same item is selected, you can load it from the array.
That did it, thank you!