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

Blocking Onchange Method

1 Answer 90 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 06 Feb 2017, 08:32 AM

Hi,

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?

Thanks

Marc

1 Answer, 1 is accepted

Sort by
0
Eduardo Serra
Telerik team
answered on 06 Feb 2017, 04:12 PM
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.

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