|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
DataRow, classe
Espace de noms : System.Data
Assembly : System.Data (dans System.Data.dll)
Le type DataRow expose les membres suivants.
| Nom | Description | |
|---|---|---|
![]() ![]() | HasErrors | |
![]() ![]() | Item[DataColumn] | |
![]() ![]() | Item[Int32] | |
![]() ![]() | Item[String] | |
![]() ![]() | Item[DataColumn, DataRowVersion] | |
![]() ![]() | Item[Int32, DataRowVersion] | |
![]() ![]() | Item[String, DataRowVersion] | |
![]() ![]() | ItemArray | |
![]() ![]() | RowError | |
![]() ![]() | RowState | |
![]() ![]() | Table |
| Nom | Description | |
|---|---|---|
![]() ![]() | AcceptChanges | |
![]() ![]() | BeginEdit | |
![]() ![]() | CancelEdit | |
![]() ![]() | ClearErrors | |
![]() ![]() | Delete | |
![]() ![]() | EndEdit | |
![]() ![]() | Equals(Object) | |
![]() ![]() | Finalize | |
![]() ![]() | GetChildRows(DataRelation) | |
![]() ![]() | GetChildRows(String) | |
![]() ![]() | GetChildRows(DataRelation, DataRowVersion) | |
![]() ![]() | GetChildRows(String, DataRowVersion) | |
![]() ![]() | GetColumnError(DataColumn) | |
![]() ![]() | GetColumnError(Int32) | |
![]() ![]() | GetColumnError(String) | |
![]() ![]() | GetColumnsInError | |
![]() ![]() | GetHashCode | |
![]() ![]() | GetParentRow(DataRelation) | |
![]() ![]() | GetParentRow(String) | |
![]() ![]() | GetParentRow(DataRelation, DataRowVersion) | |
![]() ![]() | GetParentRow(String, DataRowVersion) | |
![]() ![]() | GetParentRows(DataRelation) | |
![]() ![]() | GetParentRows(String) | |
![]() ![]() | GetParentRows(DataRelation, DataRowVersion) | |
![]() ![]() | GetParentRows(String, DataRowVersion) | |
![]() ![]() | GetType | |
![]() ![]() | HasVersion | |
![]() ![]() | IsNull(DataColumn) | |
![]() ![]() | IsNull(Int32) | |
![]() ![]() | IsNull(String) | |
![]() ![]() | IsNull(DataColumn, DataRowVersion) | |
![]() ![]() | MemberwiseClone | |
![]() ![]() | RejectChanges | |
![]() ![]() | SetAdded | |
![]() ![]() | SetColumnError(DataColumn, String) | |
![]() ![]() | SetColumnError(Int32, String) | |
![]() ![]() | SetColumnError(String, String) | |
![]() ![]() | SetModified | |
![]() ![]() | SetNull | |
![]() ![]() | SetParentRow(DataRow) | |
![]() ![]() | SetParentRow(DataRow, DataRelation) | |
![]() ![]() | ToString |
| Nom | Description | |
|---|---|---|
![]() | Field<T>(DataColumn) | Surchargé. |
![]() | Field<T>(Int32) | Surchargé. |
![]() | Field<T>(String) | Surchargé. |
![]() | Field<T>(DataColumn, DataRowVersion) | Surchargé. |
![]() | Field<T>(Int32, DataRowVersion) | Surchargé. |
![]() | Field<T>(String, DataRowVersion) | Surchargé. |
![]() | SetField<T>(DataColumn, T) | Surchargé. |
![]() | SetField<T>(Int32, T) | Surchargé. |
![]() | SetField<T>(String, T) | Surchargé. |
private void CreateNewDataRow() { // Use the MakeTable function below to create a new table. DataTable table; table = MakeNamesTable(); // Once a table has been created, use the // NewRow to create a DataRow. DataRow row; row = table.NewRow(); // Then add the new row to the collection. row["fName"] = "John"; row["lName"] = "Smith"; table.Rows.Add(row); foreach(DataColumn column in table.Columns) Console.WriteLine(column.ColumnName); dataGrid1.DataSource=table; } private DataTable MakeNamesTable() { // Create a new DataTable titled 'Names.' DataTable namesTable = new DataTable("Names"); // Add three column objects to the table. DataColumn idColumn = new DataColumn(); idColumn.DataType = System.Type.GetType("System.Int32"); idColumn.ColumnName = "id"; idColumn.AutoIncrement = true; namesTable.Columns.Add(idColumn); DataColumn fNameColumn = new DataColumn(); fNameColumn.DataType = System.Type.GetType("System.String"); fNameColumn.ColumnName = "Fname"; fNameColumn.DefaultValue = "Fname"; namesTable.Columns.Add(fNameColumn); DataColumn lNameColumn = new DataColumn(); lNameColumn.DataType = System.Type.GetType("System.String"); lNameColumn.ColumnName = "LName"; namesTable.Columns.Add(lNameColumn); // Create an array for DataColumn objects. DataColumn [] keys = new DataColumn [1]; keys[0] = idColumn; namesTable.PrimaryKey = keys; // Return the new DataTable. return namesTable; }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (rôle principal du serveur non pris en charge), Windows Server 2008 R2 (rôle principal du serveur pris en charge avec SP1 ou version ultérieure ; Itanium non pris en charge)
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.
