Name

Find

Synopsis


Int32 rowIndex = DataView.Find(Object sortKey);

Int32 rowIndex = DataView.Find(Object[] sortKey);

Returns the index of a single matching row, using the current DataView sort order. For example, if you have a sort defined on the ContactName column of the Customers table, you can use the Find( ) method to search for a row with a specific ContactName. If no match is found, the Find( ) method returns -1. If there are multiple matches, only the first is returned.

The Find( ) method requires exact matches. You can’t perform a partial match (for example, by supplying just a first name for the ContactName) or use a wildcard.