|
-
December 29th, 2008, 03:35 PM
#1
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 
btw when i declared i used
Public playerview As DataView and after datatable is filled
playerview = players.DefaultView
-
December 30th, 2008, 07:23 AM
#2
Re: dataview filter applies automaticly in defaultview - avoid this?
Instead of
Code:
playerview = players.DefaultView
try
Code:
playerview.Table = players
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rich Cook
0100 1101 0110 1001 0110 0011 0110 1000 0110 0001 0110 0101 0110 1100 0010 0000 0100 0101 0110 1100 0110 1100 0110 0101 0111 0010
-
January 1st, 2009, 01:51 PM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|