DataView.Row Filter Issue

  • Thread starter Thread starter Sajid
  • Start date Start date
S

Sajid

Hi!,

I have the following code for my Dataview which doesn't work: Any suggestions...

Dim dv As DataView
dv = New DataView

With dv

.Table = TestTable
.AllowDelete = True
.AllowEdit = True
.AllowNew = True
.RowFilter = "Column1 = Select Column from AnotherTable"
'I have many Column1 values in "AnotherTable" that I want to display
.Sort = "Column1 DESC"

End With
 
Hi Sajid,

.RowFilter = "Column1 = Select Column from AnotherTable"

I assume you mean something as "completly pseudo code"

dim anrows() as datarow = anothertable.select(.............................
dim myselectstring as string = anrows(0)("theselectfield")
for i as integer = 1 to anrows.count - 1
myselectstring += " AND " & anrows(i)("theselectfield")
next
dv.rowfilter = "Column1 = " & myselectstring

I hope this is what you are looking for?

Cor
 
Back
Top