We have introduced ResetViewSettingsController, which is activated for all Views and contains the ResetViewSettings Action.
This Action re-opens the current View and resets all the user customizations of the View's model. If you use the ListViewAndDetailView display mode, the ResetViewSettings Action is applied to both List and Detail Views. This Action is disabled (grayed out) if there are unsaved changes.
Hello Guys,
I invite you to test an updated version of the previous E1897 solution (it is now marked as obsolete), which we are planning to include in v15.2 by default. The new solution supports both WinForms and ASP.NET apps and also works for both the root and nested Views (e.g., the ones embedded into ListPropertyEditor and DetailPropertyEditor).
More information is available in the http://dennisgaravsky.blogspot.com/2015/09/how-to-reset-view-customizations-made.html blog post.
hi, Gonna check it now. Thank you.
Marcelo.
Hi Dennis,
Thanks for the sample - very useful feature. I get an exception if I try to do a reset on a ListView (Grid) nested within a DetailView (WinForms). See Exception details below.
Is this a general problem or might it just have to do with my specific project settings (Xpand etc.)?
Regards
Johannes
System.ArgumentException occurred
HResult=-2147024809
Message=Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.
Source=mscorlib
StackTrace:
bei System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
bei System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
bei Xpand.Persistent.Base.General.Controllers.InvalidEditorActionBaseControllerWin.ItemOnControlCreated(Object sender, EventArgs eventArgs) in c:\Release151\Xpand\Xpand.Persistent\Xpand.Persistent.Base\General\Controllers\InvalidEditorAction.cs:Zeile 58.
bei System.EventHandler`1.Invoke(Object sender, TEventArgs e)
bei DevExpress.ExpressApp.Editors.ViewItem.OnControlCreated()
bei DevExpress.ExpressApp.Editors.ListPropertyEditor.OnControlCreated()
bei DevExpress.ExpressApp.Editors.ViewItem.CreateControl()
Hi Johannes,
Thanks for your feedback! According to the call stack there is an issue in eXpand, which you can report via their forum.
Thanks Dennis, I posted it there.