filtering data in a Datagrid

  • Thread starter Thread starter Eva
  • Start date Start date
E

Eva

Hi,

I have a datagrid that contains data from a stored
procedure. What i want to do is to filter the data so
that i can show data that meets a specific criteria.

I.e. i have comboboxes on the side of the datagrid where
the user can specify a product name etc. I want the data
displayed in the datagrid to only be displayed if this
criteria is met.

Is there any way of filtering the data in this way?

thx in advance
 
Bind the DataGrid a DataView (which is based on the datatable that you are
currently binding to). then, just set the RowFilter of the DataView to
correspond to the fields that you want to show. If you search for DataView
and RowFilter, you'll find many examples.

HTH,

Bill
 
Hi William,

What happens when the data is updated? Will the changes
be cascaded to all the dataviews??

Is there anyway way i can update my dataset at a specific
times rather than just loading it up when the form loads.

thx
 
Back
Top