How can I disable the automatic saving when changing the row in an editable list view?
We want to allow the capture of multiple records in the grid and only save when the user decides to press the Save button. Currently, moving from edited row prompts confirmation message “Do you want to save changes?” which is not suitable for our application.
Thanks!
We have closed this ticket because another page addresses its subject:
SystemModules.Win - Make it possible to edit multiple records in an editable ListView at once and save the changes only when neededHow to disable an automatic saving when changing the row in an editable list view
Answers
Hello,
Thanks for contacting us.
To solve your problem, do the following:
- Create a ViewController and override its OnActivated method;
- In the overridden OnActivated method, use the Frame.GetController method to access the WinDetailViewController instance;
- Set the SuppressConfirmation property of the WinDetailViewController instance to True;
See Also:
http://documentation.devexpress.com/#Xaf/DevExpressExpressAppWinSystemModuleWinDetailViewController_SuppressConfirmationtopic
http://documentation.devexpress.com/#Xaf/DevExpressExpressAppWinSystemModuleWinDetailViewController_AutoCommitListViewtopic
AutoCommitListView - disable save dialog on list view
how to disable autosave confirm?
Thanks,
Dennis
Hello,
Thanks for the feedback.
Meantime, you can use the controller from the SystemModules - Make it possible to edit multiple records in an editable ListView at once and save the changes only when needed suggestion. I haven't tested it with all the scenarios supported by XAF, but possibly it will help you. Please let me know how this works for you.
Thanks,
Dennis
I am not finding any WinDetailViewController. Is this information outdated or am I looking at the wrong place?
@Olivier Jacot-Descombes:
Yes, this thread describes the outdated API, which is not longer available in the latest product version. For that purpose, the thread is duplicated to the SystemModules.Win - Make it possible to edit multiple records in an editable ListView at once and save the changes only when needed thread, which describes a more recent solution using the ModificationsController class. To learn more on built-in XAF controllers and ways to customize them, please visit the following help articles:
Concepts > Extend Functionality > Built-in Controllers and Actions
Concepts > Extend Functionality > Customize Controllers and Actions
I hope you find this information helpful.