iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
How can i get the row to return back to its previous state when in scope of OnBeforeUpdate..?
The code below does not work properly..
function OnBeforeUpdateNotify(controlId, tblName, rowObject) { var WebGrid1 = ISGetObject(controlId); var answer = confirm("Update data ?") if (answer) { return true; } else { rowObject.Row.UndoChanges(); // THIS CALL ERRORS WebGrid1.Refresh(); return false; } }
Hello,
I think it would return error only in condition if rowObject is not the current row that has pending changes.Instead to do validation in that event, I try to use the same validation in OnAcceptAllChanges event.
function WebGrid1_OnAcceptAllChanges(controlId) { var WebGrid1 = ISGetObject(controlId); var answer = confirm("Update data ?"); if (answer) { return true; } else { WebGrid1.GetChanges()[0].Row.UndoChanges(); return false; } }
To undo specific row changes, you would need to know in what index array that the row changes collection. You can use WebGrid1.GetChanges().length to know how many row changes.Hope this helps.
Regards,Handy
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname