Quote:
Originally Posted by LCookie
Hello everyone
I have an XML file which is a multitable nested xml file (.Tables.Count returned 12 tables). I would like to have all of the xml contents in one table or, if not, select different columns from these different tables (that are stored in XML) and put them in one table.
As I understood Datagridview only allows only one table at a time. Is there any way to create a new datatable by joining exsting tables from XML?
I'm sure there is some solution to this.
Thanks in advance!
How are you currently creating your tables from the XML file?
As Steven has already stated, you would have to create one table instead of multiple tables at that stage to use with your DataGridView.
If you have loaded your XML file into a
DataTable Objects you can use the
Merge Method to merge the tables together into one table...which can be used with your DataGridView.
You can read an xml file
into a DataSet....the DataSet will contain all of the tables (as DataTable Objects) that your XML file contains. All you have to do is merge the ones that you need to display.
-Frinny