Hi Jon,
You can get the name of the DataTable by using the TableName property.
private void GetTableNames(DataSet myDataSet)
{
foreach(DataTable t in myDataSet.Tables){
Console.WriteLine(t.TableName);
}
}
>My understanding of datasets some days.... especially with compact framework
>
>I get the XML with an inline schema (VFP8) from a webservice. This is done with ReadXml and I can use this in displaying textboxes and grid, but I fall short on understanding where one derives the table name in for example myDataSet.Tables[????] when it comes from a webservice. I am using myDataSetTables[0].DataView as DataSource for a DataGrid, but because I need this for DataGridColumnStyle MappingName I am at a loss.
>
>Here's part of the code.
>
>string xml = lu.ItemXML;
>
>this.ds = new DataSet();
>
>this.ds.ReadXml(new XmlTextReader(new StringReader(xml)), System.Data.XmlReadMode.ReadSchema);
>
>this.dgItemListing.DataSource = this.ds.Tables[0].DefaultView;
>
>Thanks
>Jon
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi