HI there.
I have a DataGrid bound to a SQL table in a VB.NET Windows Application.
How can I perform a search on all fields of the DataGrid/DefaultView?
When I review the Find Method, it enforces to Grid to be sorted by a field, but I want to search a string in ALL fields.
For instance, if I type 'Smith' and click my 'Search' button, I want to find (and scroll to) a record with LastName='Smith', but then I might find the Next Record containing Company='Smith & Wesson' and the next one containg CompanyType='Locksmith', etc.
Ideally, I would like to
1) Change the BackColor of the cells (Row,Col) in the Rows where the Search Text was found.
2) Scroll the DataGrid to the first found record.
3) When I press 'F3' or click 'Next' go to the next found record.
4) etc.
I believe this must be something fairly common. Any code out there?
Any ideas?
thanks
cariaco99
I have a DataGrid bound to a SQL table in a VB.NET Windows Application.
How can I perform a search on all fields of the DataGrid/DefaultView?
When I review the Find Method, it enforces to Grid to be sorted by a field, but I want to search a string in ALL fields.
For instance, if I type 'Smith' and click my 'Search' button, I want to find (and scroll to) a record with LastName='Smith', but then I might find the Next Record containing Company='Smith & Wesson' and the next one containg CompanyType='Locksmith', etc.
Ideally, I would like to
1) Change the BackColor of the cells (Row,Col) in the Rows where the Search Text was found.
2) Scroll the DataGrid to the first found record.
3) When I press 'F3' or click 'Next' go to the next found record.
4) etc.
I believe this must be something fairly common. Any code out there?
Any ideas?
thanks
cariaco99