Ticket T550476
Visible to All Users

dxDataGrid - How to customize buttons in the Popup Edit Form

created 8 years ago

[DevExpress Support Team: CLONED FROM T549384: How to implement cascaded editors in the Popup Edit Form]
How can I have access and manipulate the default save button  in popup?
Is it possible to have other buttons in popup?
Thank you

Answers approved by DevExpress Support

created 8 years ago (modified 7 years ago)

Hi saeedeh,

The dxDataGrid.editing.popup option represents a configuration object of the Popup Edit Form. So, you can add your buttons using the toolbarItems option as shown in the https://codepen.io/anon/pen/PKxgEX example.

See also:
dxDataGrid.saveEditData
dxDataGrid.cancelEditData

UPDATED BY Alessandro (DevExpress Support Team):

You can use the following markup to accomplish a similar task in Angular:

HTML
<dxo-editing mode="popup" [allowUpdating]="true"> <dxo-popup title="Employee Info" [showTitle]="true" [width]="700" [height]="345" [position]="{ my: 'top', at: 'top', of: window }" [toolbarItems]="[ { widget: 'dxButton', location: 'before', options: { text: 'Yes', icon: 'save' }, toolbar: 'bottom', onClick: onClick }]" > </dxo-popup> </dxo-editing>

Here is a complete code example: https://plnkr.co/edit/xT4dKglUFSxSpinH6vZs?p=preview.

    Comments (3)

      HI Nikolai,

      I cannot reproduce in Angular what you did in JS.

      HTML
      <dxo-editing mode="popup" [allowAdding]="true" [allowDeleting]="true" [allowUpdating]="true" > <dxo-popup [fullScreen]="false" title="Détails de l'usage de la référence" [showTitle]="true" [width]="1000" [height]="500"> </dxo-popup> <dx-toolbar [items]="items"> </dx-toolbar> <dxo-form [colCount]="1" [labelLocation]="'left'" formData="" > <dxi-item dataField="noeud"></dxi-item> <dxi-item dataField="motsClefs"></dxi-item> </dxo-form> </dxo-editing>

      I need take control over the save action performed when the popup is closed by pressing the Save button. I need to access form field and transform a bit the data.
      I tried to catch onRowUpdating event but it does not work when form or popup edit mode rather than row mode.

      The approach you provide in this codepen example seems adapted to my case, hence I am trying to replicate it in Angular.

      Thank you

      Alessandro (DevExpress Support) 7 years ago

        Hi,

        Thank you for the clarification. I have updated our original answer. Please review it.

          Thank you

          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.