Unbind code after binding

2 posts, 0 answers
  1. Yifan
    Yifan avatar
    8 posts
    Member since:
    Oct 2017

    Posted 05 Dec 2017 Link to this post

    Hi,

     

    I have the following code fragment

    element.grid.bind("excelExport", function (e) {
                    e.preventDefault();

                    promises[index].resolve(e.workbook);
                })

     

    I have an original excelExport function that has all the formatting I need. I'm wondering is it possible to unbind the 2 lines of code so that my excelExport would return to the original state (i.e. has all the formatting I have and without the 2 lines binded above)

     

    Regards,

     

    Yifan 

  2. Stefan
    Admin
    Stefan avatar
    2491 posts

    Posted 07 Dec 2017 Link to this post

    Hello, Yifan,

    I can suggest checking the following article demonstrating how to bind and then unbind functions. In this scenario, the two lines of code should be in a separate function, so this function reference can be bind and unbind:

    https://docs.telerik.com/kendo-ui/intro/widget-basics/events-and-methods#unbinding-from-events

    I hope this is helpful.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular 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