How to know edit or add action is resulted with success and how to display a message indicating that editing or adding is successful?

Hello ,
I am new at Vue and reviewing you vue components. I would like to catch the point when the actual editing process is rendered. And how to know forexample edit process is rendered successfuly. Which property I should check if editing is resulted with success? And I would like to show a success message that is including, the edit is succesful. Maybe in actionComplete event? But how can I be sure editing was successful? Thank you very much.

actionComplete:function(args){

if ((args.requestType === 'beginEdit' || args.requestType === 'add')) {
let dialog = args.dialog;
dialog.zIndex=10000
dialog.header = args.requestType === 'beginEdit' ? 'Record of ' + args.rowData['CustomerID'] : 'New Customer';

if(args.action === 'edit')
{
alert('editing')
}




}
if(args.requestType==="save")
{
alert('editing is successful!')
console.log(args)
}
}

1 Reply 1 reply marked as answer

TS Thiyagu Subramani Syncfusion Team January 14, 2021 03:02 AM UTC

Hi inanc,  

Thanks for contacting Syncfusion support.  

Yes, we have analyzed your query and suggest you use the “actionComplete” event of Grid.  By default the actionComplete event will be triggered after each successful Grid actions. So for displaying a message after successful CRUD operations use your message dialog codes by checking for the requestType as “save” and action as “edit”.  

Since the requestType as save and action as add will be used for every successful save and insert actions. Please refer the code example below,  

 function actionComplete (args) { 
    if (args.requestType === "save" && args.action === "edit") { 
       //Your dialog model to display the message after successful insert and edit actions  
      setTimeout(function() { 
        alert("Successfully added"); 
      }, 10); 
    } 
  } 

Please get back to us if you need further assistance.  

Regards,  
Thiyagu S 


Marked as answer
Loader.
Up arrow icon