Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Capturing changed grid value
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01406405
Message ID:
01406419
Vues:
36
>>When a user changes a value in the grid, I need to perform an update on my views. I need to capture the old value and also a new value. In addtion the row that the user changed I need to capture a value from another column in that row. I tried to create 2 properties called celloldvalue and cellnewvalue. Then I entered the following in the grid methods to see if I can capture the values
>>
>>in BeforeRowColChange
>>
>>LPARAMETERS nColIndex
>>thisform.celloldvalue = thisform.g2.column4.text1.value
>>
>>
>>and in AfterRowColChange
>>
>>LPARAMETERS nColIndex
>>thisform.cellnewvalue = thisform.g2.column4.text1.value
>>
>>
>>then I create a display message box to see the values, but it returns false. If a value changes in a row, I need to capture that value and also another value in the same row (which contains and id) so I can update my records in the table. I can't seem to figure out what method to update the table or how to capture the values in the row if it changed. Any insight?
>>
>>Thanks
>>Nick
>
>1. Are you using buffering?
>
>2. Don't use text.value, use Table.Field value instead
>
>3. You can bind all textboxes GotFocus and LostFocus to some form's method and trap the change this way or just put your code directly into the textbox in the grid GotFocus/LostFocus methods.


Thanks Naomi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform