TreeList's toolbar.template property ignored

4 posts, 0 answers
  1. Laszlo
    Laszlo avatar
    8 posts
    Member since:
    Sep 2014

    Posted 20 Jan 2015 Link to this post

    Hi!

    The TreeList's toolbar.template property is ignored, at least it doesn't behave like grid's toolbar.
    The toolbar configuration is the same for the grid and the treelist:
    toolbar: [
      {
        name: 'test',
        template:'<button ng-click="test()">Hi, this is the button template! {{1+3}}</button>'
      }]

    In the grid, the template works as expected, but in the treelist, the template is ignored, only a button with "test" label is shown.

    For a demo, please look at this dojo.
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2159 posts

    Posted 22 Jan 2015 Link to this post

    Hi Laszlo,


    The toolbar option of the TreeList does not contain a template sub-option. A string or a function passed directly to the toolbar option would be treated as a template.

    Regards,
    Dimiter Madjarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Laszlo
    Laszlo avatar
    8 posts
    Member since:
    Sep 2014

    Posted 22 Jan 2015 in reply to Dimiter Madjarov Link to this post

    Hi!

    Thanks, do you have plans to make it behave like grid's toolbar?
  5. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2159 posts

    Posted 22 Jan 2015 Link to this post

    Hello Laszlo,


    The Grid also supports setting the template directly on the toolbar option. As for the question, we don't have plans to change the current behavior, because it removes the confusion about what is the expected behavior when toolbar.name and toolbar.template are used together (in which case the template overrides the defined commands).

    Regards,
    Dimiter Madjarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready