DataRowView.Row Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the DataRow being viewed.
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
Property Value
The DataRow being viewed by the DataRowView.
Examples
The following example uses the Row property to print the value of the third column in each modified row of a 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
Applies to
See also
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.