Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid order - how to prevent jumping?
Message
 
 
À
02/05/2001 14:43:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00502661
Message ID:
00502683
Vues:
17
>>>>Hello everyone,
>>>>
>>>>I have a form with two grids. The main table is BldMstr, the other is Lender. BldMstr is ordered by lName. I scroll through the grid and if I find lender code, which could be changed, I dblclick on the Lender grid and this action puts new Lender code into Lender field and assign NULL to lname. It also calls tisform.Next() method, which moves to the next record. Now you can easily see my problem: I assign NULL, so the record pointer jumps to the top, which is inconvenient for the user. What would be the best and simplest way to move to the next record, which was next before assigning NULL.
>>>>
>>>>Thanks in advance.
>>>
>>>Been a while since I worked with grids...but whereever you are doing the insert, I would think you'd have to capture the record number of the record the user is on before the insert is performed. That way you could return and SKIP to the next one.
>>>
>>>One way to do this might be thru the grid.BeforeRowColChange method (put code there to save the RECNO() to a form property).
>>>
>>>Hope that helps...
>>
>>Hi Daniel,
>>
>>Recno would not help in my case. The table is in the order, so when I skip, I go to the next record, which is in the order sequence, not in the natural order.
>
>Isn't that what you want? Going back to the previous record number and SKIPping forward (or you could use the form Next() method) should still work
>
>>Anyway, the table has another field, called OldValue. In OldValue I save the current record lName. IOW, replace command does replace lName with NULL, OldValue with lcLName. Still I'm not sure, how this value will help me. I can set Near on, do seek on this value, so it automatically moves to another record. But I should not use thisform.Next() then, right?
>
>I think something like this would work:
>
>In whatever method the double-click fires:
>
>
>ThisForm.iCurrentRec = recno()
>{exec new record code}
>GOTO ThisForm.iCurrentRec
>ThisForm.Next()
>
Hi Daniel,

Did you read the original question? :) I don't do inserts, I do replace command. Your code will not help me.

Thanks anyway :)
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform