Modify json sent to server

Hello there,

is it possible to add custom key-value pairs to the jsonOject sent to the server?



2 Replies 1 reply marked as answer

DT Domenico Thöni December 1, 2021 11:23 AM UTC

Found a solution.

Add (ajaxRequestInitiate)='ajaxRequestInitiateEvent($event)' to the component and edit the jsonData there.

ajaxRequestInitiate(event: AjaxRequestInitiateEventArgs){
      if (event.JsonData['action'] == 'Download' && this.pdfViewer.serverActionSettings.download == 'SaveDocument') {
        event.JsonData.document = 'PATH TO DOCUMENT';
      }
    }

Marked as answer

VS Vasugi Sivajothi Syncfusion Team December 1, 2021 02:27 PM UTC

Hi Domenico, 
 
Thank you for the update. We are glad to hear that your requirement is achieved. Please revert to us if you need any further assistance. 
 
Regards, 
Vasugi. 


Loader.
Up arrow icon