Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid query
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
01559442
Message ID:
01559633
Vues:
50
>>>I'm assuming that you're doing a Thisform.refresh() after the search? I've generally found that this will display the grid with the correct record active. As far as changing the color, you could add a flag that would be set to .t. when found, then key off that field for color change.
>>>
>>>
>>>>Hi
>>>>
>>>>I am searhing a file with 100 records on it - all the records are displayed in a grid
>>>>
>>>>When my search finds the record i want how do I display it at the top of the grid - and how do I give a dark blue backcolor to the line of the found item
>>>>
>>>>Colin
>>
>>Yes that is happening but I really want the found record at the top of the grid
>
>Ok, then add a keyfound field
>
>When you pull the records
>
>
>Select <i>fieldlist</i>, keyfound as .f. from MyTable into cursor GridTable
>inde on keyfound tag keyfnd
>inde on keyfield tag keyfield
>
>
>I'm going to assume there's some type of text field where they enter what they're looking for, so in that Valid Event (or the Click Event if you have a 'Search' button
>
>select GridTable
>set order to keyfield
>seek TextWanted
>if found()
>  repl keyfound with .t.
>  set order to keyfnd
>endif
>Thisform.refresh()
>
>
>This should put the record on top - then you key off of keyfound for your color change.

Thanks a lot
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform