DataView.Rowfilter not working

K

Kay

Hello,

I have a problem with the RowFilter property, which I have explained below.

I create a typed dataset from a Sql view. Using a data adapter I fill the
table in the dataset. However when I try to apply a filter to the table in
the dataset, the filter is ignored, here is the code I use but I just get
back all the rows in the dataset:

Dim requestedRecord As DataView = AddressDataSet.v_Address.DefaultView
requestedRecord.RowFilter = "Address_Id = " & "'675895'"

Any help appreciated.

Thanks,
Kay.
 
C

Cor Ligthert

Kay,

In addition to Miha,

The dataview is a view to the datatable in which you can set a filter or a
sort.

Setting something in the dataview does nothing with the datatable itself.

I hope this helps?

Cor
 
G

Guest

Hi,
In addition to the answers you got, I'me wondering if you're are trying to
see the result from the datatable. Just as a test case, add a datagrid on
your form and use some code like this:

myGrid.DataSource = myView;
myGrid.DataBind();

and see if it works...(ASP.NET C# Webform)
 

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