DataView.Row Filter Issue

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
 
C

Cor

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
 

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