DataView Constructor RowFilter Doesn't Work?

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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.
 
Back
Top