Custom Toolbar button with AngularJs

3 posts, 1 answers
  1. Colin
    Colin  avatar
    18 posts
    Member since:
    Aug 2014

    Posted 09 Feb 2015 Link to this post

    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. Answer
    Alexander Valchev
    Admin
    Alexander Valchev avatar
    2890 posts

    Posted 11 Feb 2015 Link to this post

    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!
     
  3. Colin
    Colin  avatar
    18 posts
    Member since:
    Aug 2014

    Posted 11 Feb 2015 in reply to Alexander Valchev Link to this post

    Hi Alex

    Thanks for that, it works.

    Colin
Back to Top