I've got a Kend UI grid inside a second tab of kedno tabstrip and I need to get number of rows in it. For this purposes I use
/**
* Getting number of rows in grid by it's ID
* @param {string} gridId ID of the Grid
* @returns {number} number of rows
*/
function getGridRowsCountById(gridId) {
var grid = $("#" + gridId).data("kendoGrid");
console.log(grid);
grid.dataSource.read();
return grid.dataSource.total();
}
According to console log of gird object I've got nested dataSource object and _total property with number of rows value in it but total() always returns 0