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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Data Grid Delete

Thread ID:





144880 May 27,2019 12:32 PM UTC May 28,2019 04:34 AM UTC Vue 1
Tags: Data Grid
sayali saitawdekar
Asked On May 27, 2019 12:32 PM UTC

I want to delete a row from data grid, but also from my database, what is the event to handle delete function, or how can i get the id of the row which i am deleting?

Pavithra Subramaniyam [Syncfusion]
Replied On May 28, 2019 04:34 AM UTC

Hi sayali , 

Thanks for contacting Syncfusion support. 

You can achieve your requirement by using the “actionBegin” or “actionComplete” event of Grid component with requestType ‘delete’. Please refer to the below code example, documentation link and sample link for more information. 

  <div id="app"> 
    <ejs-grid  ref="grid"  id="grid" :dataSource="data" :editSettings="editSettings" :toolbar="toolbar" 
      :actionBegin="actionBegin" > 
       .  . 


export default { 
  name: "App", 
   .  .  .   
  methods: { 
    actionBegin: function(e) { 
      if (e.requestType === "delete") { 
        //getting the primary key field name 
        var primaryKeyField = this.$refs.grid.ej2Instances.getPrimaryKeyFieldNames()[0]; 
        var id = e.data[0][primaryKeyField]; 


Sample               : https://codesandbox.io/s/vue-template-q69vg  

Please get back to  us if you need any further assistance on this. 
Pavithra S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon