DataTable.DataSet Property
.NET Framework (current version)
Gets the DataSet to which this table belongs.
Assembly: System.Data (in System.Data.dll)
The following example returns the parent DataSet of a given table through the DataSet property.
Private Function GetDataSetFromTable() As DataSet Dim table As DataTable ' Check to see if the DataGrid's DataSource property ' is a DataTable. If TypeOf dataGrid1.DataSource Is DataTable Then table = CType(DataGrid1.DataSource, DataTable) GetDataSetFromTable = table.DataSet Else return Nothing End If End Function
.NET Framework
Available since 1.1
Available since 1.1
Show: