To reload or refresh a Kendo Grid, you can use the dataSource.read()
method. This method will re-fetch the data from the server and update the grid accordingly. Here's an example of how you can do it:
// Assuming you have a reference to your grid
var grid = $("#grid").data("kendoGrid");
// Reload/refresh the grid
grid.dataSource.read();
In the code snippet above, #grid
is the selector for your grid element. You can replace it with the appropriate selector for your grid. Calling dataSource.read()
triggers a new HTTP request to fetch the data from the server, and the grid will be updated automatically once the data is retrieved.
Make sure you have properly configured the data source for your grid before calling read()
. This includes setting up the URL, parameters, and any other necessary configurations for fetching the data.
Note that if you have any local data modifications or changes in the grid, calling read()
alone will not revert those changes. You may need to reset the grid or perform additional steps depending on your requirements.
Comments
Post a Comment