Setting row count after set up

3 posts, 0 answers
  1. John
    John avatar
    21 posts
    Member since:
    May 2015

    Posted 24 Dec 2015 Link to this post

    I am trying to set the max row count after I retrieved the data from AJAX call. The default option for the number of rows is 200. I am needing to be able to change this number based on the number of rows returned from AJAX call. I want the page to have to have the default of 200 when the page loads.

    The user then chooses from a dropdown on the page to query the backend for data which will have a different number of rows each time. I was hoping to be able to just set the rows property on the sheet.options object, but it does not look like these values are re-read after initialization.

    How should I do this? Especially if I am going to have multiple tabs of data with different number of rows.


  2. John
    John avatar
    21 posts
    Member since:
    May 2015

    Posted 24 Dec 2015 Link to this post

    Another reason for this question is it just suggested to set this value to really large number if I have multiple tabs?

    For Example:

    Tab 1: 20 rows
    Tab 2: 100 rows
    Tab 3: 2000 rows
    Tab 4: 500 rows

    If the max count defaults to 200, the tabs with more 200 rows will fail. If I just set the max row count to 2000 rows, all of tabs will display, but now the tabs with only a few rows like Tab 1 will have over 1,000 blank rows.


  3. Dimiter Madjarov
    Dimiter Madjarov avatar
    2122 posts

    Posted 25 Dec 2015 Link to this post

    Hello John,

    You could use the insertSheet method to add new sheets with specific options to the Spreadsheet. The object which is passed as a parameter to the method should have an options.rows configuration which specifies the number of rows in the new sheet.

    Dimiter Madjarov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top