I have some JavaScript running in the save event of the edit window of the scheduler to validate some input, if the validation fails I want to stop the windpow from closing, how can I do this?
I have tried
event.stopPropagation();
return false
Thanks
2 Answers, 1 is accepted
0
Alexander Popov
Telerik team
answered on 19 Jan 2015, 09:38 AM
Hi Alan,
Calling the e.preventDefault() method inside the save event's handler should prevent the Window from closing. For example:
function onSave(e){
if(!condition){
e.preventDefault();
}
}
Regards,
Alexander Popov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.