When I remove and then add a row in the Kendo grid, it increments the value by 1 instead of showing the same number of rows.
For eg, if I have only one row,
var dataSource1 = $("#grid").data("kendoGrid").dataSource;
a =dataSource1.data()[0];
dataSource1.remove(a)
alert("Total after removing a row : " + dataSource1.total()) // Now this is 0
dataSource1.add("Total after adding the same row" + a)
alert(dataSource1.total()) // Now this gives 2?!?!?!
But looking into the grid.dataSource.data().length gives the correct value of 1.
Due to this, the number of records present in the table shown in the table footer is displayed incorrectly.() It is shown as (1 - 2 of 2 records, instead of 1-1 of 1 record)
This also works for removing and adding multiple rows.
For eg, if I have only one row,
var dataSource1 = $("#grid").data("kendoGrid").dataSource;
a =dataSource1.data()[0];
dataSource1.remove(a)
alert("Total after removing a row : " + dataSource1.total()) // Now this is 0
dataSource1.add("Total after adding the same row" + a)
alert(dataSource1.total()) // Now this gives 2?!?!?!
But looking into the grid.dataSource.data().length gives the correct value of 1.
Due to this, the number of records present in the table shown in the table footer is displayed incorrectly.() It is shown as (1 - 2 of 2 records, instead of 1-1 of 1 record)
This also works for removing and adding multiple rows.