This is a migrated thread and some comments may be shown as answers.

Spreadsheet Sheet Batch Option

3 Answers 228 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 23 May 2017, 07:10 AM

Hi, in the documents it says to use batch if doing a number of operations on the spreadsheet. Can you explain what the {layout: true} is?

http://docs.telerik.com/kendo-ui/api/javascript/spreadsheet/sheet#methods-batch

I'm guessing it represents the change event to fire after the batch operation finishes - if this is the case are there any other options? Ie - layout is for layout changes, what about adding validations or changing colours? I cannot seem to find this list. 

Thanks

Marc

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 24 May 2017, 02:10 PM
Hi Marc,

The idea is that batch suspends certain operations that would normally occur when calling the methods outside batch. The example snippet hides the first 10 rows and columns. A refresh (relayout) of the view would occur twice on each iteration, if it was done outside a batch. So that second argument tells batch to redraw the view's layout,  after evaluating the body. The only other option I find in the source code is recalc: true. There are no other options available for this case.

Regards,
Dimitar
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.
0
Marc
Top achievements
Rank 1
answered on 25 May 2017, 06:28 AM

Hi Dimitar,

Thanks for the explanation - very clear! I understand that layout would be used for things such as hiding columns, colouring cells etc. What would recalc be used for? 

Thanks

Marc

0
Dimitar
Telerik team
answered on 26 May 2017, 12:18 PM
Hi Marc,

Batch suspends some updates that the Spreadsheet normally does during the execution of the body. For example, if you set many formulas on some cells in a batch, there won't be a recalculation after each one. Passing recalc: true tells batch that it should recalculate the formulas after the body ends.

Regards,
Dimitar
Progress Telerik
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.
Tags
Spreadsheet
Asked by
Marc
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Marc
Top achievements
Rank 1
Share this question
or