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

Custom Toolbar button with AngularJs

2 Answers 459 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Colin
Top achievements
Rank 1
Colin asked on 10 Feb 2015, 02:56 AM
Hi

I am trying to create a grid with a custom toolbar button, bt am having difficulty wiring it up.

The toolbar is defined as
toolbar: [
   {
       name: "upload",
       text: "Upload Contacts",
       click: e => {
           alert('uploadContacts');
           return false;
       }
   }]

but clicking the button just reloads the page.

The dojo http://dojo.telerik.com/abefe illustrates this. What am I doing wrong?

Thanks

Colin 

2 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 11 Feb 2015, 02:24 PM
Hello Colin,

The click configuration option do not work for buttons located in the ToolBar by design. In order to attach click event handler in the "Angular way" you may use a template.
Please see the updated example: http://dojo.telerik.com/@valchev/odIre

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Colin
Top achievements
Rank 1
answered on 11 Feb 2015, 10:47 PM
Hi Alex

Thanks for that, it works.

Colin
Tags
Grid
Asked by
Colin
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Colin
Top achievements
Rank 1
Share this question
or