Global variable is not so global :D
Posted: Wed Jul 25, 2012 12:59 pm
Hello all,
I have a little conundrum here.
I have datagrid in my program, and on its script there is this:
When I press delete key while row is selected the entry is removed from DB and datagrid, but the problem is when somebody edits the cell and want to use delete key to remove letters in edited cell, it removes the whole row :-/
So I went to column behavior script and added this for editable column:
it will assign the boolean correctly but its not passed to the same variable in datagrid script, even when I define it as global ( tried to put it into card/stack script but still its not passed )
I must be missing something very basic :-/
Regards,
Vladimir
I have a little conundrum here.
I have datagrid in my program, and on its script there is this:
Code: Select all
on deleteKey
if isEditedField is false then -- this is what I need to implement..
doDeleteLine -- delete selected line from datagrid and DB
else
pass deleteKey
end if
end deleteKey
So I went to column behavior script and added this for editable column:
Code: Select all
on preOpenFieldEditor
put true into isEditedField -- put true to this variable so when dell is pressed it will delete character not whole line
end preOpenFieldEditor
on exitFieldEditor
put false into isEditedField
end exitFieldEditor
I must be missing something very basic :-/
Regards,
Vladimir