NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataTable Methods

The methods of the DataTable class are listed below. For a complete list of DataTable class members, see the DataTable Members topic.

Public:

AcceptChanges Commits all the changes made to this table since the last time AcceptChanges was called.
Clear Clears the table of any data. All rows in all tables are removed. An exception is thrown if the table has any enforced child relations that would cause child rows to be stranded.
Compute Computes the given expression on the current rows that pass the filter criteria.
CreateColumnArray Overloaded. Creates the collection of DataColumn objects for the table.
Dispose (inherited from Component) Disposes of the Component.
Equals (inherited from Object) Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality).
GetContainer (inherited from Component) Returns the IContainer that contains the Component.
GetDesignMode (inherited from Component) Gets a value indicating whether the Component is currently in design mode.
GetErrors Returns an array of DataRow objects that contain errors.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetServiceObject (inherited from Component) Returns an object representing a service provided by the Component.
GetType (inherited from Object) Gets the Type of the Object.
NewRow Creates a new DataRow with the same schema as the table.
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 table back to its original state.
ResetCaseSensitive Resets the CaseSensitive property to its default state.
ResetColumns [To be supplied.]
ResetConstraints [To be supplied.]
ResetLocale Resets the Locale property to its default state.
ResetNamespace Resets the Namespace property to its default state.
ResetPrimaryKey Resets the PrimaryKey property to its default state.
Select Overloaded. Returns an array of DataRow objects.
ShouldPersistCaseSensitive Indicates whether the CaseSensitive property should be persisted.
ShouldPersistColumns [To be supplied.]
ShouldPersistConstraints [To be supplied.]
ShouldPersistLocale Indicates whether the Locale property should be persisted.
ShouldPersistNamespace Indicates whether the Namespace property should be persisted.
ShouldPersistPrimaryKey Indicates whether the PrimaryKey property should be persisted.
ToString Returns the TableName and DisplayExpression, if there is one as a concatenated string.

Protected:

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere.
FindRow Overloaded. Finds and returns a specific DataRow.
FindRows Overloaded. Finds and returns an array of DataRow objects.
HasSchemaChanged Gets a value indicating whether the column count has changed.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
OnColumnChanging Raises the ColumnChanging event.
OnPropertyChanged Raises the OnPropertyChanged event.
OnRemoveColumn Notifies the DataTable that a DataColumn is being removed.
OnRowChanged Raises the RowChanged event.
OnRowChanging Raises the RowChanging event.
OnRowDeleted Raises the OnRowDeleted event.
OnRowDeleting Raises the OnRowDeleting event.

Event Hookup:

AddOnColumnChanging Adds an event handler for the ColumnChanging event.
AddOnPropertyChanged Adds an event handler for the OnPropertyChanged event.
AddOnRowChanged Adds an event handler for the RowChanged event.
AddOnRowChanging Adds an event handler for the RowChanging event.
AddOnRowDeleted Adds an event handler for the OnRowDeleted event.
AddOnRowDeleting Adds an event handler for the OnRowDeleting event.
RemoveOnColumnChanging Removes the event handler that has been associated with the OnColumnChanging event.
RemoveOnPropertyChanged Removes an event handler that has been associated with the OnPropertyChanged event.
RemoveOnRowChanged Removes an event handler for the row changed event. Occurs after a row in the table has been successfully edited.
RemoveOnRowChanging Removes an event handler for the row changing event. Occurs when a row in the table has proposed edits. The user can modify values in the row and should throw an exception to cancel the edit.
RemoveOnRowDeleted Removes an event handler for the row deleting event. Occurs after a row in the table was deleted.
RemoveOnRowDeleting Removes an event handler for the row deleting event. Occurs after a row in the table is about to be deleted.

See Also

DataTable Class | System.Data Namespace