DataTable.DefaultView

  • Thread starter Thread starter sandman
  • Start date Start date
S

sandman

I'm trying to filter the data as I load a dataset, so I
set the RowFilter property of the DataTable's
DefaultView. But the dataset still contains all of the
records. Is the row filter (and dataviews) meant to be
used only for accessing data rather than loading the
dataset? Maybe I'm using it wrong. Why else would it load
the entire table? Do I have to actually change the
SelectCommand in the DataAdapter in order to limit what
gets loaded in DataSet?
 
Try reading it this way

foreach(DataRowView drv in dv)
{ System.Data.DataRow dr = drv.Row;
..... <more..code>
}

Pramod
 
Yes...
your data adapter is the one that fill the dataset
the dataview is for going filter, sort, allow... and back
 
Back
Top