2X faster development
The ultimate ASP.NET MVC UI toolkit to boost your development speed.
Problem: 1. Showing confirmation dialog while saving the changes of the current page. 2. Disable the confirmation dialog while navigating to another page and save the changes.
Solution: Showing confirmation dialog while saving the changes of the current page. We can achieve the above requirement by using ShowConfirmDialog property of the grid while using Batch editing feature. While using batch editing feature of the grid, the ShowConfirmDialog property of the EditSettings is enabled by default and so whenever the changes of the current page get saved it will show the confirmation dialog. And also while navigating to another page without saving the changes of the current page it will show the confirmation dialog for confirming to save the changes. Example: We can enable the Batch editing feature and ShowConfirmDialog property of the grid as follows.
Result: (i) While saving edited record details in same page by clicking on the save button in toolbar.
(ii) While saving the edited records details when navigating from one page to another. Solution: Disable the confirmation dialog while navigating to another page and saving the changes.
We can prevent the confirmation dialog by set “showConfirmDialog” property of the editSettings as “false” in ActionBegin event of the grid while navigating to another page.
Example:
In the above code snippet we have used “getBatchChanges” method for getting the changes of the current page and saved the changes in the global variable We have assigned the changes of previous page to the “batchChanges” property of the grid for saving the changes in ActionComplete event of the grid while navigating to another page.
In the above code snippet we have set the showConfirmDialog property of the editSettings as “true” again for showing the confirmation dialog in the current page while clicking the save button from the toolbar. Result: Figure 1: Editing a record The edited records are saved automatically while navigating from one page to another, without display any confirmation dialog. Figure 2: Saving an edited record without displaying confirmation message.
|
2X faster development
The ultimate ASP.NET MVC UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.