Page 1 of 1

Update a field in a Data Grid after edit

Posted: Sat Oct 17, 2015 9:27 pm
by RobertNM
I am using a Data Grid to display a list of Customers.

The database contains four fields.
Customer, Previous Reading, Current Reading, Used

When the user enters an amount into "Current Reading" I want the results of:
"Current Reading" - "Previous Reading" to be entered into the field "Used"
Field 3 minus Field 2 equals Field 4
How can I do this and where do I insert the code?

I believe that it goes somewhere in the Current Behavior of the Data Grid Template.

Thank you,
RobertNM

Re: Update a field in a Data Grid after edit

Posted: Tue Oct 20, 2015 10:36 pm
by MaxV
Just use:

Code: Select all

on CloseFieldEditor pFieldEditor
    #you code
end CloseFieldEditor 
Add this message in datagrip group script.
For more informationS see: http://livecode.wikia.com/wiki/Datagrid_API