Ticket T373398
Visible to All Users

New Web.UI - how to hide Save and SaveAndNew actions, but keep SaveAndClose

created 9 years ago

Hi,

My customer had request to hide both Save and SaveAndNew and keep only SaveAndClose action (it fits better with their workflow).
That worked fine in old web ui (both actions were disabled in controller), but in new SaveAndClose is inside Save action and when Save is hidden, so is SaveAndClose.

Is there a way to keep SaveAndClose and hide Save and SaveAndNew in new Web UI?

Regards,
Mario

Comments (1)

    Same request or add a return option without save?

    Answers approved by DevExpress Support

    created 9 years ago (modified 8 years ago)

    Hello Mario,

    This behavior occurs because of a combination of the WebActionContainer.IsDropDown = true, WebActionContainer.DefaultActionID = "Save" and WebActionContainer.AutoChangeDefaultAction = true settings. You can change them according to your needs in a controller or in the custom template content. For example, you can set the WebActionContainer.IsDropDown property to false to show the container's active actions individually:

    C#
    public class ToolbarCustomizationController : WindowController { public ToolbarCustomizationController() { TargetWindowType = WindowType.Main; } protected override void OnActivated() { base.OnActivated(); Frame.ProcessActionContainer += Frame_ProcessActionContainer; } void Frame_ProcessActionContainer(object sender, ProcessActionContainerEventArgs e) { if (e.ActionContainer.ContainerId == "Save" && e.ActionContainer is WebActionContainer) { ((WebActionContainer)e.ActionContainer).IsDropDown = false; } } protected override void OnDeactivated() { base.OnDeactivated(); Frame.ProcessActionContainer -= Frame_ProcessActionContainer; } }

    Let me know if you need further assistance.

    Update:
    This behavior has been changed in 16.1.7 - now if you deactivate the Save action, other actions from its dropdown will remain visible.

      Comments (3)
      MB MB
      Mario Blatarić 9 years ago

        Hi,

        This is it.
        Thank you for your assistance.

        Anatol (DevExpress) 9 years ago

          You are welcome!

          Anatol (DevExpress) 8 years ago

            FYI: this behavior has been changed in 16.1.7 - now if you deactivate the Save action, other actions from its dropdown will remain visible.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.