How to get total rows count of kendo ui spreadsheet

2 posts, 0 answers
  1. Vijayakumar
    Vijayakumar avatar
    6 posts
    Member since:
    Sep 2013

    Posted 21 Dec 2016 Link to this post

    I have a Kendo UI Spreadsheet. How do I get the rows count of latest added rows? Say the spreadsheet is empty, I have added data for 2 rows. How do I get the row count. I am using, 

    var grid = $("#spreadsheet").data("kendoSpreadsheet");
           var sheet = grid.sheetByIndex(0);
           var data = sheet.toJSON();
           var totalRowsCount = data.rows.length;

    Here, the totalRowsCount does not always get data rows count and gets total rows that I have defined for my kendo spreadsheet. 

  2. Stefan
    Stefan avatar
    1257 posts

    Posted 23 Dec 2016 Link to this post

    Hello Vijayakumar,

    If the desired result is to get the number of latest added rows, I can suggest having two additional variables to track the old and the new row numbers. This will help to determine how many rows are newly added.

    I made a Dojo example based on the provided code to demonstrate this implementation:

    I hope this is helpful.

    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top