The DataTable Class You use an object of the DataTable class to represent a table.. You can also store multiple Table 11.1: DataTable PROPERTIES PROPERTY TYPE DESCRIPTION string compari
Trang 1The DataTable Class
You use an object of the DataTable class to represent a table You can also store multiple
Table 11.1: DataTable PROPERTIES
PROPERTY TYPE DESCRIPTION
string comparisons within DataTable objects are case-sensitive
ChildRelations DataRelationCollection Gets the collection of relations
(DataRelationCollection) that allows navigation from a parent table to a child table A
DataRelationCollection consists of DataRelation objects
(DataColumnCollection) that contains DataColumn objects that represent the columns
in the DataTable object
(ConstraintCollection) that contains Constraint objects that represent primary key
(UniqueConstraint) or foreign key constraints (ForeignKeyConstraint) in the DataTable object
belongs
of the rows in the DataTable have errors
are the primary keys for the DataTable
that contains the DataRow objects stored in the DataTable
Table 11.2: DataTable METHODS
Trang 2METHOD RETURN
TYPE
DESCRIPTION
since it was loaded or since the last time the AcceptChanges() method was called
that clone
pass the filter criteria
it was last loaded or since the last time the AcceptChanges() method was called
have errors
matching object is found, a new row is created using the specified values
since it was created or since the last time the AcceptChanges() method was called
in the DataTable that match the specified filter string You can also pass a string containing details on how to sort the DataRow objects
Table 11.3: DataTable EVENTS
EVENT EVENT HANDLER DESCRIPTION
ColumnChanging DataColumnChangeEventHandler Fires before a changed
DataColumn value is committed in
a DataRow
ColumnChanged DataColumnChangeEventHandler Fires after a changed DataColumn
value is committed in a DataRow
committed in a DataTable
Trang 3Table 11.3: DataTable EVENTS
EVENT EVENT HANDLER DESCRIPTION
committed in a DataTable
from a DataTable
from a DataTable