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 & ""
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?