Overriding the function for Ctrl+S

Hello,

I basically want to  override the function that gets triggered upon pressing Ctrl+S in Vuejs for the spreadsheet component.

I tried this:
this.$refs.exceleditor.save = this.saveSpreadsheet
but didn't work.

Thanks

3 Replies 1 reply marked as answer

SP Sangeetha Priya Murugan Syncfusion Team February 4, 2021 07:30 AM UTC

Hi Omar, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your reported requirement and it can be achievable in our spreadsheet by using the beforeSave event as like as below. It triggers before save the spreadsheet as excel file. 
 
<ejs-spreadsheet 
        ref="spreadsheet" 
        :beforeSave="beforeSave"> 
      </ejs-spreadsheet> 
 
beforeSave: function (args) { 
      // Do your functionality here. 
    }, 
 
For your convenience, we have prepared the sample based on our suggestion. Please refer the below link. 
 
 
Could you please check the above links and get back to us, if you need any further assistance on this. 
 
Regards, 
Sangeetha M 


Marked as answer

OM Omar February 4, 2021 06:29 PM UTC

But what if I want to disable the logic of calling the saveUrl automatically, I want to implement my own logic instead.


SP Sangeetha Priya Murugan Syncfusion Team February 5, 2021 07:31 AM UTC

Hi Omar, 
 
Thank you for your update. 
 
We have checked your reported requirement and we would like you know that it can be achievable in our spreadsheet by setting args.cancel property as true in beforeSave event. 
 
<ejs-spreadsheet 
        ref="spreadsheet" 
        :beforeSave="beforeSave"> 
      </ejs-spreadsheet> 
 
beforeSave: function (args) { 
      args.cancel = true; // to prevent the save acton 
      // Do your functionality here. 
    }, 
 
For your convenience, we have prepared the sample based on our suggestion. Please refer the below link. 
 
 
Could you please check the above links and get back to us, if you need any further assistance on this. 
 
Regards, 
Sangeetha M 


Loader.
Up arrow icon