This documentation is archived and is not being maintained.
DataTable Methods
Visual Studio 2008
The DataTable type exposes the following members.
| Name | Description | |
|---|---|---|
|
AcceptChanges | Commits all the changes made to this table since the last time AcceptChanges was called. |
|
BeginInit | Begins the initialization of a DataTable that is used on a form or used by another component. The initialization occurs at run time. |
|
BeginLoadData | Turns off notifications, index maintenance, and constraints while loading data. |
|
Clear | Clears the DataTable of all data. |
|
Clone | Clones the structure of the DataTable, including all DataTable schemas and constraints. |
|
Compute | Computes the given expression on the current rows that pass the filter criteria. |
|
Copy | Copies both the structure and data for this DataTable. |
|
CreateDataReader | Returns a DataTableReader corresponding to the data within this DataTable. |
|
CreateInstance | Infrastructure. |
|
Dispose | Overloaded. Releases the resources used by the MarshalByValueComponent. |
|
EndInit | Ends the initialization of a DataTable that is used on a form or used by another component. The initialization occurs at run time. |
|
EndLoadData | Turns on notifications, index maintenance, and constraints after loading data. |
|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
|
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from MarshalByValueComponent.) |
|
GetChanges | Overloaded. Gets a copy of the DataTable containing all changes made to it since it was last loaded, or since AcceptChanges was called. |
|
GetDataTableSchema | This method returns an XmlSchemaSet instance containing the Web Services Description Language (WSDL) that describes the DataTable for Web Services. |
|
GetErrors | Gets an array of DataRow objects that contain errors. |
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetObjectData | Populates a serialization information object with the data needed to serialize the DataTable. |
|
GetRowType | Infrastructure. |
|
GetSchema | Infrastructure. |
|
GetService | Gets the implementer of the IServiceProvider. (Inherited from MarshalByValueComponent.) |
|
GetType | Gets the type of the current instance. (Inherited from Object.) |
|
ImportRow | Copies a DataRow into a DataTable, preserving any property settings, as well as original and current values. |
|
Load | Overloaded. Fills a DataTable with values from a data source using the supplied IDataReader. If the DataTable already contains rows, the incoming data from the data source is merged with the existing rows. |
|
LoadDataRow | Overloaded. Finds and updates a specific row. If no matching row is found, a new row is created using the given values. |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
Merge | Overloaded. Merge the specified DataTable with the current DataTable. |
|
NewRow | Creates a new DataRow with the same schema as the table. |
|
NewRowArray | Infrastructure. |
|
NewRowFromBuilder | Creates a new row from an existing row. |
|
OnColumnChanged | Raises the ColumnChanged event. |
|
OnColumnChanging | Raises the ColumnChanging event. |
|
OnPropertyChanging | Raises the PropertyChanged event. |
|
OnRemoveColumn | Notifies the DataTable that a DataColumn is being removed. |
|
OnRowChanged | Raises the RowChanged event. |
|
OnRowChanging | Raises the RowChanging event. |
|
OnRowDeleted | Raises the RowDeleted event. |
|
OnRowDeleting | Raises the RowDeleting event. |
|
OnTableCleared | Raises the TableCleared event. |
|
OnTableClearing | Raises the TableClearing event. |
|
OnTableNewRow | Raises the TableNewRow event. |
|
ReadXml | Overloaded. Reads XML schema and data into the DataTable. |
|
ReadXmlSchema | Overloaded. Reads an XML schema into the DataTable. |
|
ReadXmlSerializable | Infrastructure. |
|
RejectChanges | Rolls back all changes that have been made to the table since it was loaded, or the last time AcceptChanges was called. |
|
Reset | Resets the DataTable to its original state. |
|
Select | Overloaded. Gets an array of DataRow objects. |
|
ToString | Gets the TableName and DisplayExpression, if there is one as a concatenated string. (Overrides MarshalByValueComponent::ToString().) |
|
WriteXml | Overloaded. Writes the current contents of the DataTable as XML. |
|
WriteXmlSchema | Overloaded. Writes the current data structure of the DataTable as an XML schema. |
| Name | Description | |
|---|---|---|
|
AsDataView | Creates and returns a LINQ-enabled DataView object. (Defined by DataTableExtensions.) |
|
AsEnumerable | Returns an IEnumerable<T> object, where the generic parameter T is DataRow. This object can be used in a LINQ expression or method query. (Defined by DataTableExtensions.) |
Show: