Information générale
Catégorie:
Gestionnaire d'écran & Écrans
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement