Datagrid Form style and closefieldEditor
Yves COPPE
yvescoppe at skynet.be
Wed Sep 2 01:39:22 EDT 2009
Le 2 sept. 09 à 00:26, Trevor DeVore a écrit :
> On Sep 1, 2009, at 5:04 PM, Yves COPPE wrote:
>
>> when i write such a sriipt in the datagrid behavior script of a
>> datagrid in a form style :
>>
>> on CloseFieldEditor pFieldEditor
>> SetDataOfIndex the dgIndex of me, the short name of me, the text
>> of pFieldEditor
>> end CloseFieldEditor
>>
>> The text of the fld in the datagrid is not updated !!
>>
>> ...
>>
>> what is wrong ?
>
> When calling SetDataOfIndex the data grid does not refresh itself so
> that is most likely the problem. I imagine you got the code from <http://revolution.screenstepslive.com/spaces/revolution/manuals/datagrid/lessons/4668-How-Do-I-Open-a-Table-Cell-For-Editing-
> > and it appears the example there is incorrect.
>
> I've updated the lesson with code that should work. Does this work
> for you?
>
> on CloseFieldEditor pFieldEditor
> put the dgIndex of me into theIndex
> put the dgDataOfIndex[theIndex] of the dgControl of me into theDataA
> put the text of pFieldEditor into theDataA[the dgColumn] of me
> set the dgDataOfIndex[theIndex] of the dgControl of me to theDataA
> end CloseFieldEditor
>
> --
> Trevor DeVore
> Blue Mango Learning Systems
>
Hi Trevor,
Now it works correctly.
thanks.
Greetings.
Yves COPPE
yvescoppe at skynet.be
More information about the use-livecode
mailing list