System.Data Namespace DataRowView Class
Deletes a row.
[ VB ]
Public Sub Delete ( )
[ C# ]
public void Delete ( );
[ C++ ]
public: void Delete ( );
[ JScript ]
public function Delete ( );
The row is not permanently deleted until AcceptChanges is invoked on the DataTable that row belongs to.
The following example uses the Delete method on a row.
private void DeleteRow ( ) {
DataRowView myRow;
DataView myDataView = ( DataView ) myGrid.DataSource;
myRow = myDataView [ myGrid.CurrentCell.RowNumber ];
myRow.Delete ( );
}
Private Sub DeleteRow ( )
Dim myRow As DataRowView
Dim myDataView As DataView = CType ( myGrid.DataSource, DataView )
myRow = myDataView ( myGrid.CurrentCell.RowNumber )
myRow.Delete ( )
End Sub |
|
C# |
VB |
DataRowView Members BeginEdit