| Subject |
Field validation in grid |
| From |
Milind Nighojkar <milinigh@yahoo.com> |
| Date |
Mon, 09 Aug 2021 14:08:35 -0400 |
| Newsgroups |
dbase.getting-started |
Scenerio:
I am in grid.
I want to validate a field say a date field D1. Validation is D1 > date() with error message when cursor is leaving field or record.
I want cursor to stay in filed till feild value satisifies the validation condition
Code is something like this
function editorControl_onLostFocus()
local lRet
lRet = false
if this.value < date()
lRet = false // Allow cancel
this.validErrorMsg := "Past Date NOT allowed"
else
lRet = true
endif
return lret
Any suggestion ?
I used various ways usingevents like onlostfocus,valid for field
At row level rowset_canEdit()
Regards
|
|