Finds a row in the DataView by the specified primary key value.
[Visual Basic] Overloads Public Function Find( _ ByVal key As Object _ ) As Integer [C#] public int Find( object key ); [C++] public: int Find( Object* key ); [JScript] public function Find( key : Object ) : int;
The index of the row in the DataView.
The following example uses the Find method to return the index of the row containing the desired value in the primary key column.
[Visual Basic]
Private Sub FindValueInDataView(t As DataTable) Dim dv As DataView Dim i As Integer dv = New DataView(t) dv.Sort = "CusomerID" ' Find the customer named "DUMON" in the primary key column i = dv.Find("DUMON") Console.WriteLine(dv(i)) End Sub
DataView Class | DataView Members | System.Data Namespace | DataView.Find Overload List | Delete