DataRowView.Row Propiedad

Definición

Obtiene el DataRow que se está viendo.

public:
 property System::Data::DataRow ^ Row { System::Data::DataRow ^ get(); };
public System.Data.DataRow Row { get; }
member this.Row : System.Data.DataRow
Public ReadOnly Property Row As DataRow

Valor de propiedad

DataRow que está viendo DataRowView.

Ejemplos

En el ejemplo siguiente se usa la Row propiedad para imprimir el valor de la tercera columna en cada fila modificada de .DataView

private void ShowColumn3()
{
    DataView view = (DataView) dataGrid1.DataSource;

    // Set the filter to display only those rows that were modified.
    view.RowStateFilter=DataViewRowState.ModifiedCurrent;

    // Change the value of the CompanyName column for each modified row.
    foreach(DataRowView rowView in view)
    {
        Console.WriteLine(rowView.Row[2]);
    }
}
Private Sub ShowColumn3()
    Dim view As DataView = CType(dataGrid1.DataSource, DataView)

    ' Set the filter to display only those rows that were modified.
    view.RowStateFilter = DataViewRowState.ModifiedCurrent

    ' Change the value of the CompanyName column for each modified row.
    Dim rowView As DataRowView
    For Each rowView In  view
        Console.WriteLine(rowView.Row(2))
    Next rowView
End Sub

Se aplica a

Consulte también