Home > DeveloperSection > Forums > How to filter a dataview
Takeshi Okada
Takeshi Okada

Total Post:89

Posted on    September-04-2013 3:21 AM


 1 Reply(s)
 1026  View(s)
Rate this:

I have a dataview that contains a list of tables. I am reading in a list of values that I then want to apply as a filter to this dataview. The list of values is actually in the form of "table1, table2, table3". So I thought I would be able to use this as a filter on my dataview.

SqlOp.CommandText = "select name from dbo.sysobjects where xtype='u'";


DataView dv = SqlOp.GetDataAsDataView();


Returns a list of all the tables in a dataview. Any help on how to filter this dataview?

Sumit Kesarwani

Total Post:378

Posted on    September-04-2013 7:12 AM

Hi Takeshi,

I figured out the .RowFilter issue:

dv.RowFilter = "name IN ('table1', 'table2', 'table3')

Don't want to miss updates? Please click the below button!

Follow MindStick