Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Re-ordering Grid
Message
De
01/04/1997 15:29:46
 
 
À
01/04/1997 15:18:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00026434
Message ID:
00026457
Vues:
32
>>>I have a grid which lists three fields: Member, ISD, and Campus. The grid is sorted by member name, and allows the user to select a member. I want to re-order the grid by ISD or Campus if the user tabs over to one of the other fields, but preserve the record that was already selected. Re-ordering the grid is simple enough, by just changing the order and refreshing the form in the gotfocus event of the testbox in the respective grid column. The problem is that the record is not preserved. I've tried trapping the reord number before the SET ORDER and GO RECORD after, but to no avail. I tried catching the Primary key value, and then SEEKing that record again, but after the index is set, I can't SEEK on the primary key. How can I do this?
>>
>>Instead of SEEK, try LOCATE FOR.
>>
>>Steve Despres
>>EZ Data Inc
>>sdespres@erols.com
>
>Okay- a new revision to the problem. What I was trying the first time was working- I just didn't notice because of this: the top record in the _grid_ was being preserved... not the one with a highlighted field. When I tab back and forth, the top record stays put, the rest of them get re-ordered around. I see two possible ways out- either make sure that only the top record gets highlighted by making the grid scroll with each up and down movement of the cursor (I haven't a clue how to go about this) or, each time the user tabs back and forth, before re-ordering, re-orient the grid to put the highlighted record on top. Any clues on how to go about this?

When you change active tag, record pointer stays on the same record! Basically, your problems will be resolved if you will change tag and Refresh grid (I assume it's better that Form.Refresh.) in AfterRowColChange Event.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform