How pass parameters when is inserting/updating/deleting

Hi,

I would like to send a parameter to the controller when I am inserting/updating/deleting, how can to do that?

Thanks

1 Reply 1 reply marked as answer

TS Thiyagu Subramani Syncfusion Team June 25, 2020 01:40 PM UTC

Hi Dawo, 

Thanks for contacting Syncfusion forum. 

Based on your reported information we have validated and suspect your requirement is “Need to send additional parameter when is inserting/updating/deleting”. For this case you can pass additional parameters to server by using addParams method of Query class. Please find the below documentation link for your reference.  
  

You can pass additional parameter for different grid performs like below code. Here we have passed different parameters for add, edit, delete operations using actionBegin event. 

 function actionBegin(args) { 
        if (args.requestType === 'add') { 
            this.query = new ej.data.Query().addParams('ej2grid', 'true'); 
        } 
        if (args.requestType === 'beginEdit') { 
            this.query = new ej.data.Query().addParams('ej2grid2', 'true'); 
        } 
        if (args.requestType === 'delete') { 
            this.query = new ej.data.Query().addParams('ej2grid3', 'true'); 
        } 
    } 

 
Please get back to us, if you need any further assistance. 
  
Regards,  
Thiyagu S 


Marked as answer
Loader.
Up arrow icon