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

Unbind code after binding

1 Answer 359 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yifan
Top achievements
Rank 1
Yifan asked on 05 Dec 2017, 04:41 PM

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 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 07 Dec 2017, 07:50 AM
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.
Tags
Grid
Asked by
Yifan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or