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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Calling a function from Inline Editing CRUD functionality

Thread ID:

Created:

Updated:

Platform:

Replies:

141417 Dec 11,2018 04:18 AM UTC Dec 13,2018 08:36 AM UTC React - EJ 2 3
loading
Tags: Grid
Hiro Yoneyama
Asked On December 11, 2018 04:18 AM UTC

Hi,

I'm looking at the Inline Editing Grid and wondering how can I make custom calls to a function (in my case a Redux action), for Add, Delete and Update? Would I have to use the dataStateChange function in the GridComponent?

Regards,

Hiro

Thavasianand Sankaranarayanan [Syncfusion]
Replied On December 12, 2018 06:57 AM UTC

Hi Hiro, 

Thanks for contacting Syncfusion support. 

Query :  I'm looking at the Inline Editing Grid and wondering how can I make custom calls to a function (in my case a Redux action), for Add, Delete and Update? 

We have analyzed your query and we can make custom calls to the Add, Delete and Update operation functions using grid methods as mentioned below,  

Code Example

[sample-base.js] 
... 
           toolbarClick(args) { 
          if(args.item.id=="grid_CustomAdd"){ 
            this.addRecord();                        //for add operation 
          } 
          else if(args.item.id=="grid_CustomEdit"){ 
            this.startEdit();                        //for edit operation 
          } 
          else if(args.item.id=="grid_CustomDelete"){ 
            this.deleteRecord(this.getSelectedRows()[0]);    //for delete operation 
          } 
          else if(args.item.id=="grid_CustomUpdate"){      
            this.endEdit();                                  //for update operation 
          } 
        } 
... 

[index.js] 
... 
this.toolbarOptions = ['CustomAdd', 'CustomEdit', 'CustomDelete', 'CustomUpdate', 'Cancel']; 
... 


                                https://ej2.syncfusion.com/documentation/api/grid/#startedit 
                                https://ej2.syncfusion.com/documentation/api/grid/#endedit  
                                https://ej2.syncfusion.com/documentation/api/grid/#deleterecord  

Please get back to us for further assistance. 
 
Regards, 
Thavasianand S. 


Hiro Yoneyama
Replied On December 13, 2018 01:07 AM UTC

Thank you for the response, I think this should work for our purposes.

Regards,

Hiro

Mohammed Farook J [Syncfusion]
Replied On December 13, 2018 08:36 AM UTC

Hi Hiro,  
 
Thanks for your update. 
 
We are happy to hear that the provided solution has been resolved your problem. 
 
Please get back to us if you need further assistance. 
 
Regards 
J Mohammed Farook 
 


CONFIRMATION

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

;