asp.net.ph

DataView.Find Method

System.Data Namespace   DataView Class


Finds a row in the DataView.

Overload List

1. Finds a row in the DataView by the specified primary key value.

2. Finds a row in the DataView by the specified primary key values.


Example

The following example uses the Find method to return the index of a row that contains specified values in its primary key columns.

NOTE: This example uses one of the overloaded versions of Find. For other examples that may be available, see the individual overload topics.

private void FindValueInDataView ( DataTable tbl ) {
   DataView dv = New DataView ( tbl );
   dv.Sort = "Cusomers";
   Object [ ] vals ( 1 );
   vals [ 0 ] = "John";
   vals [ 1 ] = "Smith";
   // Find the customer named "John Smith".
   int i = dv.Find ( vals );
   Response.Write ( dv [ ] );
}
  C# VB

See Also

DataView Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph