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

data-bind events dynamic add/remove

2 Answers 162 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
velu
Top achievements
Rank 1
velu asked on 02 Jun 2016, 01:13 PM

Hi,

Is there any way of removing/adding data-bind events dynamically to HTML elements.

 

Thanks,

Velu

2 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 07 Jun 2016, 09:00 AM
Hello Velu,

You can learn more about attaching event handlers dynamically here:
Kendo UI Widget Events 

As the article states, event handlers, which are attached during widget initialization, will be executed every time the event is fired (applied to declarative events assignment, too). If you need the handler to be executed only once, then attach it after the widget initialization with the one method:
var listview = $("#listView").data("kendoMobileListView");
 
// attach an event handler that will be executed only the first time the event is fired
listview.one("click", function(e) {
      console.log("click event handler");
});


Regards,
Tsvetina
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
velu
Top achievements
Rank 1
answered on 18 Jul 2016, 10:11 AM
Thanks Tsvetina :)
Tags
General Discussion
Asked by
velu
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
velu
Top achievements
Rank 1
Share this question
or