Typed DataSets and FindRows

  • Thread starter Garth Ogzewalla
  • Start date
G

Garth Ogzewalla

How do you use the FindRows method of the view in a typed
dataset? FindRows returns a DataRowView array, but I
would like to access those rows using the typed datasets
tablexRow syntax. But the compiler sees them as different
types and won't allow me to do so.

What I'd like to do is something like:

myData SetmyData = new myDataSet();
myDataSet.MyTableRow[] aRows;

aRows = myData.myTable.DefaultView.FindRows(someValue);
foreach (myDataSet.myTableRow drRow in aRows)
{
drRow.myColumn = someOtherValue;
}

But what I've had to do is declare aRows as an array of
DataRowView, and use the drRow["myColumn"] syntax
instead. Is there some way to access the DataRowView
using the object.object syntax of the typed dataset?

Thanks,

Garth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top