Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid sorting with header object click event...
Message
De
21/09/1999 20:06:18
 
 
À
21/09/1999 15:22:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00267281
Message ID:
00267390
Vues:
24
I see you solved your problem, but I thought I could shed a little more light on what is happening. For some reason, when you reorder in a grid, the grid looks at the record that is in the first row before the sort, and positions itself based on the position of that record after the sort. It would make more sense to look at the current record instead of the one that happens to be in the top row, but that's not the way that it works.

>I think I have it figured out.
>
>When the thisform.refresh fires, it changes the order of the records in the grid. for example, if I am on row 23 and change the order and refresh the grid, tom jones moves to record # 57. The refresh command keeps me on row 23 which is now carol adams. I need to move my row pointer to follow my record number.
>
>>>>
>>>>That sounds like normal behavior, it's staying on the same record, not necessarily the row. Usually, with a new sort, you either want to:
>>>>
>>>>1) stay on the same record, which is what yours is doing, I think?
>>>>2) go to the top
>>>>
>>>>So, are you sure it's purely random and not #1 here?
>>>
>>>It stays on the same row in the grid, but the record changes.
>>>
>>>ie, I'm on tom jones, I click on the firstname field, and I'm on carol adams.
>>
>>Depends on sort method, I guess. A SET ORDER keeps the same record, where a new INDEX ON will go to the top. I almost always go to top anyway in my grid sorts, but Mike's suggestion is the way to go if you're doing fresh INDEXes and want to keep your record.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform