By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,066 Members | 1,625 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,066 IT Pros & Developers. It's quick & easy.

Slow RowFilter

P: n/a
I am writing a winform that has a DataGrid attached to a DataView. The
filter uses date column that is set using a user supplied value. The
filter works great (less than 1 second for grid refresh) except where a
previous filter has set the grid to zero records (i.e. the person did
not work that day). Now when you select a day the refresh takes a full
30 seconds. This only happens the first time after the form loads.
Later you can go to zero records and back to multi records at the
subsecond speeds.

'has records takes 1 second
myDataView.RowFilter = "WorkDate = '09/08/2005'"

'09/09 has records 1 second
myDataView.RowFilter = "WorkDate = '09/09/2005'"
'09/10 zero records 1 second
myDataView.RowFilter = "WorkDate = '09/10/2005'"

'has records takes 30 + seconds
myDataView.RowFilter = "WorkDate = '09/08/2005'"

'from here on no problems even with zero records.

There is something about a filter thats reduces the rows to zero that
first time that causes a real slowdown when the filter gets reset the
next time.

Any help/suggestions are welcome.

Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.