System.Data Namespace DataRowCollection Class
Returns the row specified by the primary key value.
[ VB ] Overloads Public Function Find ( _ ByVal key As Object _ ) As DataRow [ C# ] public DataRow Find ( object key ); [ C++ ] public: DataRow* Find ( Object* key ); [ JScript ] public function Find ( key : Object ) : DataRow;
A DataRow containing the primary key value specified; otherwise a null value if the primary key value does not exist in the DataRowCollection.
To use the Find method, the DataTable object to which the DataRowCollection object belongs to must have at least one column designated as a primary key column. See the PrimaryKey property for details on creating a primary key column.
The following example uses the Find method to find the specified primary key value in a collection of DataRow objects.
DataRow thisRow = myRows.Find ( empToDelete );
dim thisRow as DataRow = myRows.Find ( empToDelete )
Show me
DataRowCollection Members DataRowCollection.Find Overload List DataTable PrimaryKey Contains
© 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