How To Implement Dynamic Search Functionality to Locate Records in a DataGrid That Is Bound to a Large ADO Recordset (266654)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- ActiveX Data Objects (ADO) 2.1
- ActiveX Data Objects (ADO) 2.1 SP1
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
This article was previously published under Q266654 SUMMARY Many Visual Basic database applications require that you
locate record(s) that match a specified criteria in a DataGrid control that is bound to a large ActiveX Data Objects (ADO)
recordset. To simplify the process of scrolling through the grid to locate the
necessary record(s), you can sort the bound recordset by a lookup field rather
than searching through an unsorted recordset.
A more sophisticated
method to address this requirement is to dynamically restrict the records that
are displayed in the bound DataGrid to those records that contain a lookup value that the user types
for a chosen filter column in the recordset. The code sample in this article
demonstrates how to enforce a filter on the recordset to restrict the records
according to this method. REFERENCES For additional information, click the following article
number to view the article in the Microsoft Knowledge Base: 308070
How To Implement a Searchable DataGrid by Using ADO.NET and Windows Forms
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kbhowto KB266654 |
---|
|