Ticket Q101147
Visible to All Users

customize delete button layout

created 17 years ago

I have a client for whom I have built an express app. He wants me to move the delete button to the other side of the form, so that it isn't too close to the validate and save buttons. This app only has a windows module, so no web forms are needed. I'd like to avoid creating or customizing each form, because he wants the change on every form. Is this easily achievable? What is the best way to accomplish this type of customization.

Show previous comments (1)
Dennis Garavsky (DevExpress) 17 years ago

    Hi Don,
    It is really tough to accomplish, but it will require customizing XAF templates. The Delete action is placed in the RecordEdit action container (as you know the action's category is the RecordEdit). It means that this action will be there where this container lies in the tool bar.
    So, to change the action's location, you will need to change its Category property. You can do this via a view controller. In it, override the OnActivated method and access the DeleteObjectsViewController and its DeleteAction. For this action, you should change the Category property to the new category (it will be the ContainerId property of the new action container). Please see the How to remove or hide (deactivate, disable) a button ( Action ) from tool bar KB article for more information on this task.
    Please see the adding a new action container to a template and other issues in our Support Center, for a sample project on how to add a new action container to the template. Note that you will need to add this container for each template, in which the RecordEdit container exists.
    Unfortunately, it seems this is the only solution we can suggest. Please let us know if you encounter any difficulty when implementing the approaches I suggested. I will be happy to assist you.
    Looking forward to hearing about your results.
    P.S.
    Please see the following issue: ID Q97588 (NewAction container without template modification) to see how to add a container without templates modification. It may be also useful to your task.
    Thanks,
    Dennis

    ?
    Unknown 17 years ago

      Thanks for the help. I may indeed contact you for further assistance, as this is rather new to me. However, I may also have a discussion with my client on the many merits of careful clicking :)

      Dennis Garavsky (DevExpress) 17 years ago

        Hi Don,
        It will help us if you would provide a sample project and explain to us the problem you are facing when following our recommendations. We do our best to find a solution for you.
        P.S.
        >>
        However, I may also have a discussion with my client on the many merits of careful clicking :)
        <<
        It seems to a be a good idea as well)))
        Thanks,
        Dennis

        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.