[SOLVED]-CLOSEFIELD EXITFIELD FOCUSIN GRID VALIDATION
Posted: Tue Feb 17, 2015 6:26 pm
HI
WE have all these handlers we can "override" like closefield , exitfield, focusin, focusout , enterinfield (which is actually the RETURN key ) enter is the key on the numeric keypad.
They are not consistent as to when they are called - Ive tried to call closefield from the datagrid script, the column behaviour and it doesn't get called. ExitField gets called in the field editor (from revdata)n when I attach that behavior to a button a point the grid to it. on EscapeKey works in the same custom field editor but on closefiled doesnt.
Now I realise that somehow the datagrid takes control but when you have these lines in the default behavior :-
on closeField
## Don't delete editor within same message
send "DeleteFieldEditor" to the dgControl of me in 0 seconds
end closeField
Then you'n expect it to be called.
My question is I want to validate the data in a grid column (say date, currency etc)
But I don't want to have the call inside 3 or 4 (or more) handlers - which is the most high level handler that can be called when entering or leaving a cell and either stopping the exit/losing focus or directing the focus to another object.
i have had to put code IN ESCAPEKEY, EXITFIELD, RETURNINFIELD, arrowkeys and tabkey just to make sure I haven't missed anything.
This is too hit and miss for my liking.
What we need is a command that we can put into the messagepath that always gets called when the focus is TRIYNG to leave a cell and you either pass back a field/cell number or a object to put focus on.
In foxpro we had a very consistent system
Valid()
When()
LostFocus()
GotFocus()
Just to be more specific - I know that you Gurus out there (Trevor, Klause, Jaq, Mweider, Zryip, Simon, Bangkok, Darbx .... sorry if I left anybody out, this was just from memory) could give me a few pointers - Im assuming the DeleteFieldOpenNext is probably where I should be looking is that right?
Hope that's clear - It would also
Oh and any specific Gotchas that anyone else has found would be useful to me (and all the other beginners).
KIndest Regards Lagi
WE have all these handlers we can "override" like closefield , exitfield, focusin, focusout , enterinfield (which is actually the RETURN key ) enter is the key on the numeric keypad.
They are not consistent as to when they are called - Ive tried to call closefield from the datagrid script, the column behaviour and it doesn't get called. ExitField gets called in the field editor (from revdata)n when I attach that behavior to a button a point the grid to it. on EscapeKey works in the same custom field editor but on closefiled doesnt.
Now I realise that somehow the datagrid takes control but when you have these lines in the default behavior :-
on closeField
## Don't delete editor within same message
send "DeleteFieldEditor" to the dgControl of me in 0 seconds
end closeField
Then you'n expect it to be called.
My question is I want to validate the data in a grid column (say date, currency etc)
But I don't want to have the call inside 3 or 4 (or more) handlers - which is the most high level handler that can be called when entering or leaving a cell and either stopping the exit/losing focus or directing the focus to another object.
i have had to put code IN ESCAPEKEY, EXITFIELD, RETURNINFIELD, arrowkeys and tabkey just to make sure I haven't missed anything.
This is too hit and miss for my liking.
What we need is a command that we can put into the messagepath that always gets called when the focus is TRIYNG to leave a cell and you either pass back a field/cell number or a object to put focus on.
In foxpro we had a very consistent system
Valid()
When()
LostFocus()
GotFocus()
Just to be more specific - I know that you Gurus out there (Trevor, Klause, Jaq, Mweider, Zryip, Simon, Bangkok, Darbx .... sorry if I left anybody out, this was just from memory) could give me a few pointers - Im assuming the DeleteFieldOpenNext is probably where I should be looking is that right?
Hope that's clear - It would also
Oh and any specific Gotchas that anyone else has found would be useful to me (and all the other beginners).
KIndest Regards Lagi