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
Hello,
Is there any was to hide the Accept all changes button from the review changes screen? If so please help me with the required changes, I'm currently using webgrid v9_0_7200.
Please find the attached image, I want to remove the button marked in red.
Thanks,
Phanindra.
I override wgReviewChanges method and use following snippet code in order to remove the "Accept All Changes" button.
*Note: wgReviewChanges(gridId) is the method that invoked when user click the "Review Pending Changes" button (in the right-side of WebGrid's status bar).
var wgReviewChanges = (function () { var original_wgReviewChanges = wgReviewChanges; var gridId = "WebGrid1"; return function (gridId) { original_wgReviewChanges(gridId); window.setTimeout(function () { var dlgReviewDivId = "dvWnd_Global_wnd" + gridId + "_dlgReview"; var dlgReviewDivElement = document.getElementById(dlgReviewDivId); var iFrameElement = dlgReviewDivElement.getElementsByTagName("iframe").wndWebGrid1_dlgReview; var innerDoc = (iFrameElement.contentDocument) ? iFrameElement.contentDocument : iFrameElement.contentWindow.document; var acceptAllBtnElement = innerDoc.getElementById(gridId + "_btnAccept_f"); acceptAllBtnElement.style.display = "none"; }, 100); } })();
I enclosed a simple sample (as attachment) of batch update enabled WebGrid which implements the above script. Hope this helps.
Thanks for the response, I used the function you provided in the aspx page, but still I'm able to see the Accept All Changes, I tried it doing within the launchreviewchanges, but innerDoc doesn't have defintion for gridId + "_btnAccept_f" .
Please Let me know where the change is to be made, if I include in the aspx page, the Review All changes screen is not yet loaded, so the there would be no buttonId.
So please make clear regarding the change and also the locatin of the change.
Phanindra
I suspect that the iFrameElement might be null which causing the button "Accept All Changes" keep appearing.
I modified the script into following:
var wgReviewChanges = (function () { var original_wgReviewChanges = wgReviewChanges; var gridId = ISGetObject("WebGrid1").Id; return function (gridId) { original_wgReviewChanges(gridId); window.setTimeout(function () { var dlgReviewDivId = "dvWnd_Global_wnd" + gridId + "_dlgReview"; var dlgReviewDivElement = document.getElementById(dlgReviewDivId); var iFrameElement = dlgReviewDivElement.getElementsByTagName("iframe")[0]; var innerDoc = (iFrameElement.contentDocument) ? iFrameElement.contentDocument : iFrameElement.contentWindow.document; var acceptAllBtnElement = innerDoc.getElementById(gridId + "_btnAccept_f"); acceptAllBtnElement.style.display = "none"; }, 100); } })();
I have checked that adding the above script after WebGrid tag will removes the Accept All Changes button.
Should you have different result, you can try to: set the time out to be longer; or debug the script.
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