Spreadsheet Sheet Batch Option

4 posts, 0 answers
  1. Marc
    Marc avatar
    171 posts
    Member since:
    Sep 2016

    Posted 23 May 2017 Link to this post

    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

  2. Dimitar
    Admin
    Dimitar avatar
    473 posts

    Posted 24 May 2017 Link to this post

    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.
  3. Marc
    Marc avatar
    171 posts
    Member since:
    Sep 2016

    Posted 25 May 2017 in reply to Dimitar Link to this post

    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

  4. Dimitar
    Admin
    Dimitar avatar
    473 posts

    Posted 26 May 2017 Link to this post

    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.
Back to Top