I want to update data in grid without using the update button provided by syncfusion.how can i update the data using another button(save) on the page.

I want to update data in grid without using the update button provided by syncfusion. how can I update the data using another button(save) on the page. 


sync1.PNG


i want to send the data in api by using the next button. (screenshot below)

sync2.PNG


3 Replies

BS Balaji Sekar Syncfusion Team March 30, 2022 04:12 PM UTC

Hi Abhishek,


Greetings from the Syncfusion support.


Based on your query we have achieved the save action on external button click using endEdit method of Grid.


Please refer the below code example and sample for more information.

[index.js]

  onClick(e) {

    if (this.grid.getBatchChanges().changedRecords.length > 0) {

      this.grid.endEdit();

    }

  }


Sample link: https://stackblitz.com/edit/react-nnxtsi


Please get back to us, if you need further assistance.


Regards,

Balaji Sekar.



AR Abhishek Rana April 6, 2022 09:34 AM UTC

hi balaji sekar!

thanks for the help , problem is resolved.



RS Rajapandiyan Settu Syncfusion Team April 7, 2022 05:17 AM UTC

Hi Abhishek,


We are glad that you have achieved your requirement with the provided solution.


Please get back to us if you need further assistance with us.


Regards,

Rajapandiyan S


Loader.
Up arrow icon