Blocking Onchange Method

2 posts, 0 answers
  1. Marc
    Marc avatar
    167 posts
    Member since:
    Sep 2016

    Posted 06 Feb Link to this post


    Is there any way to block the onchange method of the spreadsheet conditionally? My use case is below:

    When our users click on the spreadsheet, we getthe top selected row and add some dropdowns (validations) to it (I cannot do this on spreadsheet initialisation as the speed is too slow). However, this forces the onchange method to fire a number of times. The onchange method watches certain columns, as when users change the actual value we need to recalculate things. Is there any way in the onchange method, to work out if the "change" was just adding validation to the cell, as this is all we do in the onclick method?



  2. Eduardo Serra
    Eduardo Serra avatar
    95 posts

    Posted 06 Feb Link to this post

    Hello Marc,

    As a general rule, events in Kendo UI cannot be conditionally triggered; what can be done, is to conditionally execute some code inside depending on the event arguments. In this case, you might find something inside the sender, and/or range that could help you determine the best logic to follow for different cases.

    If that's not enough, alternatives other than the change event should be considered to contain your recalculations.

    I hope this helps.

    Eduardo Serra
    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