troubleshooting Question

Dataview Filter Alternative

Avatar of FMabey
FMabeyFlag for United Kingdom of Great Britain and Northern Ireland asked on
Visual Basic.NET
10 Comments1 Solution554 ViewsLast Modified:
Hi all,

I am currently using dataview rowfilters to change the data shown in a datagridview.

I basically have two datagridviews on a form. One (DGV_RFI), has a list of contract numbers 200 to 500, with each contract number having idents ranging from 1 to 100. When the user scrolls through this list of idents I would like my other Datagridview (DGV_RFIDraw) to change to show records relating to the contract and ident currently selected by the user in DGV_RFI.

DGV_RFI is bound to a SQL Server table and DGV_RFIDraw is bound to a SQL Server View. Both DGV's use a dataview to display their data (The dataviews are bound to datasets).

Currently I am using the following code to filter DGV_RFIDraw:

Private Sub DGV_RFI_CellEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGV_RFI.CellEnter

DV_RFIDraw.RowFilter = "Cont = " & TXT_RFIContract.Text & " AND RFI = " & TXT_RFI.Text & ""
End Sub

This code works but as the user scrolls through the list (DGV_RFI) it is very slow.

Can anyone think of an alternative way of making this smoother?

Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros