Approved
Last Updated: 03 May 2019 10:29 by ADMIN
David M
Created on: 20 May 2016 16:33
Category: Spreadsheet
Type: Feature Request
17
Dynamically change the number of rows
Use case:
My app doesn't know how many rows of data the excel spreadsheet will be prior to upload.  I've defaulted to my maximum amount of 10,000 which will be normal for some, but overkill for others.  The ability to change the number of rows/columns to accommodate the size of the sheet after loading, would be a nice addition.  

As a workaround, I'm destroying and reloading the widget instance after the initial load.
4 comments
Seuthes
Posted on: 29 Apr 2019 06:24

Totally agree to Steve.

A sheet should expand automatically, when a user fills the last rows. Such a behavior would also be nice for the columns.

Steve
Posted on: 27 Feb 2017 16:11
The workaround is a tad cumbersome, would be nice to be OOTB.  Kinda seems like a feature that was just missed nobody thought of it in testing, but really kinda needs to be here.

I would also really like the ability to specify a buffer, so like if I specify 20 as the buffer and the Datasource returns 1000, I then have 1020 rows in the sheet.
James
Posted on: 08 Nov 2016 05:33
You could use "insertRow" and "deleteRow" to get the correct rows back.

However, as always with major UI updates, put it into "batch":
{{{
.batch(function () {
   .. Code to insert/remove rows
        }, { layout: true });
}}}
ADMIN
T. Tsonev
Posted on: 04 Nov 2016 17:47
Hi,

The fromJSON method (http://docs.telerik.com/kendo-ui/api/javascript/ui/spreadsheet#methods-fromJSON) on the Workbook will create a sheet with the appropriate size to accommodate all records. 

Additionally, you don't need to re-create the whole Widget, just call `insertSheet` with the appropriate size.

Does this help?