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

Select row with JavaScript without triggering change event

2 Answers 1262 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cees
Top achievements
Rank 1
Cees asked on 11 Nov 2016, 08:03 AM

Hello,

I would like to select a row with JavaScript without triggering the change event, but it should fire when a mouse click is selecting a row. How can I do this? When I google I saw that in the past that the JS select and change trigger was seperated.

With kind regards,

Cees

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 14 Nov 2016, 11:54 AM
Hello Cees,

There is not built-in approach to prevent the change event if it is fired from the select method using JavaScript.

I can suggest using a flag which will check if the change event is fired by the user or not, and based on this information to execute or not the desired code.

Please check the Dojo example demonstrating this implementation:

http://dojo.telerik.com/aZIXA

I hope this will help to achieve the desired result.

Regards,
Stefan
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
0
Cees
Top achievements
Rank 1
answered on 14 Nov 2016, 12:33 PM

Thank you for your answer, I will go with that workaround.

With kind regards,

Tags
Grid
Asked by
Cees
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Cees
Top achievements
Rank 1
Share this question
or