I have a grid where a custom toolbar using toolbarclickhandler (source) button calls an API Post method
(as posted here)
, it all runs correctly but the grid is not refreshed after the record is added. I tried using a Grid.Refresh() inside OnAfterRender() but that runs before the api call.
How can I refresh the grid after that API post ends?
PS.: As a helper, I want the same call that the built in Add toolbar function runs after adding the record.
MSMonisha Saravanan Syncfusion Team October 7, 2022 07:25 AM
Greetings from Syncfusion support.
We have checked your query and we suspect that you are
facing issues with Grid refresh instead of calling Grid refresh we suggest you
to fetch and assign the datasource again to the DataSource property of the
Grid. So that it will reflect properly with the new Dataset.
If the reported issue still persist then kindly share the
below details to validate further at our end.
Share us the entire Grid code snippet.
Share us the video demonstration of the issue.
If possible kindly share us the issue reproduceable sample.
above-requested details will be very helpful for us to validate the reported
query at our end and provide the solution as early as possible.
Marked as answer
FRFranciscoOctober 10, 2022 09:54 AM
Thank you Monisha,
VNVignesh Natarajan Syncfusion Team October 10, 2022 11:12 PM
Thanks for the update.
We are glad to hear that you have resolved your query using our solution. Please get back to us if you have further queries.