DataView Constructor RowFilter Doesn't Work?

G

Guest

Hi all,

I'm assigning my RowFilter like:

Dim AlbumView As New DataView(AlbumDataSet.Tables("album"), "owner = " &
User.UserId, Nothing, DataViewRowState.Unchanged)


However, this works:

Dim AlbumView As New DataView(AlbumDataSet.Tables("album"))
AlbumView.RowFilter = "owner = " & User.UserId

So my question is ... why doesn't setting the RowFilter in the constructor
work?
 
G

Guest

Dim AlbumView As New DataView(AlbumDataSet.Tables("album"), "owner = " &
User.UserId, Nothing, DataViewRowState.Unchanged)

I think I found the issue:

Dim AlbumView As New DataView(AlbumDataSet.Tables("album"), "owner = " &
User.UserId, Nothing, DataViewRowState.CurrentRows)

DataviewRowState must be set to CurrentRows not none, unchanged, etc.
 

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