Lightswitch html client override default save button -
i want able override default save button on html client cant seem find control so. want write validation behind , allow user select option cant seem find it.
i know silverlight client can override cant seem override in html client.
thanks
it's achieved using beforeapplychanges.
example: (please excuse typos/syntax errors, rough idea!)
myapp.addeditscreen.beforeapplychanges = function (screen) { switch (screen.property_savingstatus) { case 'not saving': settimeout(function () { // override save -> toggle savingstatus -> call save again savemychangesmyway(); screen.property_savingstatus = 'commit'; myapp.commitchanges(); // or discard or apply. }, 500); return false; // cancel save changes request break; case 'apply': return true; break; default: };
Comments
Post a Comment