Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to keep grid records in order as key field is change
Message
From
23/01/2005 22:21:32
 
 
To
23/01/2005 22:12:07
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00979904
Message ID:
00979917
Views:
21
Hi, Alex.

>>>A grid shows rows of an ordered table. As new records are added they show at the top of the grid, as they should. When the key field is changed I'd like the current record to show in the appropriate relative position in the grid at about the middle visible row of the grid. How do you accomplish that?
>>
>>grid.Refresh() ?
>
>Hi Martin,
>
>It doesn't do it, at least not if I place it in the valid of the textbox in the grid. It isn't essential, so don't worry.

Oh, I see. It can get a bit tricky when you're editing over the gird itself.

Try the following:
1. Save the record pointer
2. Skip to the next record
3. Refresh
4. Return to the record
5. Refresh again

You may even try without refreshing in step 3, as it can produce a small flicker effect, but it can be needed.

Hope this helps.

Un abrazo,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform