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

Edit Settings

I am using Dialog Mode while editing, but i am not able to differentiate if i am editing or creating new row data while saving the data.
I am using 
actionBegin(args){
if (args.requestType == "save") {
          ....}
                   }
The save request type is common for both edit and add data. how should i differentiate.

Attachment: gridedit3_fe8833b.rar

1 Reply

PS Pavithra Subramaniyam Syncfusion Team May 28, 2019 04:33 AM UTC

Hi sayali , 

Thanks for contacting Syncfusion support. 

You can differentiate the save operation by using the “action” property of the actionBegin event arguments. Please refer to the below code example, documentation link and sample link for more information. 

[App.Vue] 
<template> 
  <div id="app"> 
    <ejs-grid  ref="grid"  id="grid" :dataSource="data" :editSettings="editSettings" :toolbar="toolbar" 
      :actionBegin="actionBegin" > 
      <e-columns> 
       .  . 
      </e-columns> 
    </ejs-grid> 
  </div> 
</template> 

<script> 

export default { 
  name: "App", 
   .  .  .   
  methods: { 
    actionBegin: function(e) { 
      actionBegin: function(e) { 
      if (e.requestType === "save") { 
        console.log(e.action);       // returns “add” for add action and “edit” for edit action 
     
   
 
}; 
</script> 


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

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


Loader.
Live Chat Icon For mobile
Up arrow icon