Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
...how to tell if Grid row has changed.
Message
De
27/07/2000 11:32:27
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
27/07/2000 10:33:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00397581
Message ID:
00397628
Vues:
11
Paul,

Add a property to the grid or the form which will hold the PK (second choice is RECNO()) of the record you're on.

In the AfterRowColChange() compare the PK of the current row to the PK in the property. If it's different, you know you're on a different record.

If it's different, update the PK in the property, and do whatever other stuff like highlighing the row.




Hello everyone,
>Here's my scenario. I have a grid starting as readOnly. Column 4 holds an edit button in each row. If the user clicks that edit button, the grids read only becomes false, but to make the editing apply to only that row, I'd like to force the user to answer the question 'save changes?' in the beforeRowColChange event. The grid.activeRow is stored in a parameter I added to the form. If they say either yes or no, the readOnly goes back to .t., and the updates are either made or not made accordingly (The grids recordSource is a cursor which will write data back to a table).
>
>My problem, is that I can't get the beforeRowColChange event to recognize ONLY the row changes, and ignore the column changes. The help file claims that the 'nColIndex' parameter:
>
>'Returns the index of the newly active row or column.'
>
>When in fact it seems to only return the column index, as its name would imply. I want to compare that newly active row value to my value stored in my customized form parameter. Can someone set me straight on how to recognize row changes while ignoring column changes?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform