NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataView.Find (Object)

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;

Parameters

key
[To be supplied.]

Return Value

The index of the row in the DataView.

Example [Visual Basic]

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

See Also

DataView Class | DataView Members | System.Data Namespace | DataView.Find Overload List | Delete