This question is locked. New answers and comments are not allowed.
So I have a grid on a search page that I need to rebind on button click.
here is my code.
var sourceUrl = "Dynamic source url";
var dataSource1 = new kendo.data.DataSource({
type: "json",
transport: {
read: sourceUrl
},
serverOperation: false,
serverSorting: true
});
var grid = $("#grid").data("kendoGrid");
grid.dataSource = dataSource1;
grid.dataSource.transport.read();
grid.dataSource.read();
grid.refresh();
This all happens on a button click event outside of the grid.
The problem is, is that the grid is not actually refreshing. The data is being pulled back successfully, but it is not getting displayed.
Since I have server sorting turned on on the grid, I clicked on one of the column headers and the data displayed properly.
What is server sorting doing to the grid to refresh it that is different than what I am doing?
here is my code.
var sourceUrl = "Dynamic source url";
var dataSource1 = new kendo.data.DataSource({
type: "json",
transport: {
read: sourceUrl
},
serverOperation: false,
serverSorting: true
});
var grid = $("#grid").data("kendoGrid");
grid.dataSource = dataSource1;
grid.dataSource.transport.read();
grid.dataSource.read();
grid.refresh();
This all happens on a button click event outside of the grid.
The problem is, is that the grid is not actually refreshing. The data is being pulled back successfully, but it is not getting displayed.
Since I have server sorting turned on on the grid, I clicked on one of the column headers and the data displayed properly.
What is server sorting doing to the grid to refresh it that is different than what I am doing?