View Single Post
Old Jan 10th, 2008, 12:24 PM   #4
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,799
Rep Power: 5 Sane will become famous soon enough
Re: Preforming a binary(SQL) search on a datagrid.

Quote:
...I'm thinking of doing a Select statement, having that return a row, and then using that row...
Quote:
...use the PK of the returned row to find it...
Same thing. The latter is more "round-about" if you want to look at it that way, but retrieving the row number of a query is still the exact same amount of work done by the application as retrieving the pk column in a query. So whichever you find easier from a coding standpoint...

So after you've done that, you then know the row number that matches the search query. Just reference that row number in the grid data and change its appearance. You can figure out how to do this by looking at the documentation for the GUI control you're using. This object will have methods that you can call, one of which should be able to modify the apperance of row #X. These methods will be listed along with their usage in their respective documentation.
Sane is offline   Reply With Quote