The correct usage of the closeFieldEditor is to use it in the default column
behavior or the column behavior of thecolumns to sum (Débit and Crédit)

Add a column behavior to the first column (Débit), and edit the behavior.

In the script, change the closeFieldEditor like this:

on closeFieldEditor pFieldEditor
  set the text of fld "fldTotDébit" to the uSumOfColumn["Débit"] of the
dgControl of me
  set the text of fld "fldTotCrédit" to the uSumOfColumn["Crédit"] of the
dgControl of me
end closeFieldEditor

Untested but should work.

If all is ok, update the column behavior of the "crédit" column with the
same script

2010/7/9 Andre.Bisseret <[email protected]>

> Bonjour TheSlug,
>
>  Thank you for your reply.
>
> Seems I am missing something
>
> I have 2 fields under the datagrid where I want to put the total of 2
> columns of the datagrid  (fldTotDébit and fldTotCrédit)
>
> In the script of the datagrid, I put:
>
> on closeFieldEditor pFieldEditor
>   set the text of fld "fldTotDébit" to the uSumOfColumn["Débit"] of me
>   set the text of fld "fldTotCrédit" to the uSumOfColumn["Crédit"] of me
> end closeFieldEditor
>
> but when I edit a cell of the datagrid nothing happens
> Could be because I don"t know what should be the parameter pFieldEditor?
>
> André
>
>
> Le 9 juil. 10 à 14:37, zryip theSlug a écrit :
>
>  Bonjour André,
>>
>> You have to use the CloseFieldEditor event.
>>
>> Have a look to this lesson:
>> http://lessons.runrev.com/manuals/datagrid/lessons/7335
>>
>> Regards,
>>
>> 2010/7/9 Andre.Bisseret <[email protected]>
>>
>>  Bonjour,
>>>
>>> I have quite small editable data grids.
>>>
>>> I would like to re-calculate the totals of the columns after the user has
>>> changed the value of any cell.
>>>
>>> I don't need to know what cell was edited.
>>>
>>> What message should I use ?
>>>
>>> Thanks in advance for any advice
>>>
>>> Best regards from Grenoble (very hot here!)
>>>
>>>
>>
>>
>> --
>> -Zryip TheSlug- wish you the best! 8)
>> http://www.aslugontheroad.co.cc
>> _______________________________________________
>> use-revolution mailing list
>> [email protected]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
>
>
> _______________________________________________
> use-revolution mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to