Good Afternoon:
I'm creating a screen that filters data before its sent to a grid. The filter has several various combinations. In the code below, I'm filtering documents and it seems to work. However, I need to add other items to this RowFilter.
For instance: dv.RowFilter = "flag1 = 'X' AND flag2 = 'X'" so on and so forth ...
Any ideas?Code:adapter.SelectCommand = myCommand adapter.Fill(ds, "myCommand") dv = New DataView(ds.Tables(0)) If docs = "nodocs" Then dv.RowFilter = "flag = 'X'" ElseIf docs = "docs" Then dv.RowFilter = "lag = ''" ElseIf docs = "both" Then dv.RowFilter = "flag in ('X','')" End If grid.DataSource = dv grid.DataBind()


Reply With Quote


Bookmarks