We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to customize edit dialog button in Vue Grid

Dear support,

I used this documentation in order to create my Dialog Grid.
https://ej2.syncfusion.com/vue/documentation/grid/edit/#dialoginline-template 

However, I did not find the way to customize the buttons "cancel" and "save". I would like to change the label & colors.

Can you help me ?

Best regards,

3 Replies 1 reply marked as answer

MS Manivel Sellamuthu Syncfusion Team June 7, 2021 11:01 AM UTC

Hi Sandra, 

Greetings from Syncfusion support. 

You can change the label of the Dialog using Grid localization and color of the Dialog using CSS. Please refer the below code example and sample for more information. 

<template> 
  <div id="app"> 
    <ejs-grid 
      ref="grid" 
      :dataSource="data" 
      :toolbar="Toolbar" 
      allowPaging="true" 
      :editSettings="editSettings" 
    > 
      <e-columns> 
.  .  . 
      </e-columns> 
    </ejs-grid> 
  </div> 
</template> 
<script> 
import { L10n, setCulture } from "@syncfusion/ej2-base"; 
 
Vue.use(GridPlugin); 
// changing the label of the buttons 
L10n.load({ 
  "en-US": { 
    grid: { 
      SaveButton"Allow", 
      CancelButton"Deny", 
    }, 
  }, 
}); 
 
export default Vue.extend({ 
  data: () => { 
    return { 
      data: gridData, 
      wrapSettings: { wrapMode: "Content" }, 
      customAttributes: { class"customcss" }, 
      pageSettings: { pageSize: 5 }, 
      Toolbar: ["Add""Delete""Edit"], 
      editSettings: { 
        allowEditing: true, 
        allowAdding: true, 
        allowDeleting: true, 
        mode: "Dialog", 
        template: function () { 
       . . .  
    }; 
  }, 
  methods: {}, 
  provide: { 
    grid: [EditPageToolbarContextMenu], 
  }, 
}); 
</script> 
 
<style> 
@import https://cdn.syncfusion.com/ej2/material.css;
// changing the color of the buttons
 
.e-footer-content button.e-control.e-btn.e-lib.e-primary.e-flat { 
  background: blanchedalmond; 
  color: green; 
} 
.e-footer-content button.e-control.e-btn.e-lib.e-flat { 
  color: red; 
} 
</style> 



Please let us know if you need further assistance. 

Regards, 
Manivel 


Marked as answer

AU aurelian July 24, 2023 12:33 PM UTC

how can i do the same but in angular? to have a custom label for the buttons on ej-dialog....



RR Rajapandi Ravi Syncfusion Team July 25, 2023 10:48 AM UTC

Aurelian,


Also, the locale text for the Save and Cancel buttons has been changed by overriding the default locale strings. We have already discussed about your requirement in our documentation which can be accessed from the below link,


Documentation: https://helpej2.syncfusion.com/angular/documentation/grid/editing/dialog-editing#customize-edit-dialog


Loader.
Up arrow icon