dataview filter applies automaticly in defaultview - avoid this?
how can i avoid the filter to apply automaticly to default view
i have here a table "players" and when i started my program i thought at using a separate view from the dataview to easily work with data. this dataview is called "playerview"
but while i am working in my program and applying filters to playerview, the filter goes automaticly to players.defaultview and i need the default view.rowfilter to be empty so i can apply a different filter from the playerview.
thanks for trying to understand my problem :D
btw when i declared i used
Public playerview As DataView and after datatable is filled
playerview = players.DefaultView
Re: dataview filter applies automaticly in defaultview - avoid this?
Instead of
Code:
playerview = players.DefaultView
try
Code:
playerview.Table = players
Re: dataview filter applies automaticly in defaultview - avoid this?
If you are FILTERING data, like you say, then you need to use the .Filter property.
I combine 3 tables into one temp table. I show only a few fields for each record in a grid on top, and a tabbed view for each field in the temp table.
I load the temp table into a grid, after applying the 'default' filter. (they only see ALL of 'their' records, not the whole db)
From there, I ADD TO THE FILTER, so they see less records.
Code:
' var.Filter = var.Filter + NewFilter