data-bind events dynamic add/remove

3 posts, 0 answers
  1. velu
    velu avatar
    6 posts
    Member since:
    Feb 2016

    Posted 02 Jun Link to this post

    Hi,

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

     

    Thanks,

    Velu

  2. Tsvetina
    Admin
    Tsvetina avatar
    1873 posts

    Posted 07 Jun Link to this post

    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.

     
  3. velu
    velu avatar
    6 posts
    Member since:
    Feb 2016

    Posted 18 Jul in reply to Tsvetina Link to this post

    Thanks Tsvetina :)
Back to Top