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

TreeList's toolbar.template property ignored

3 Answers 111 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Laszlo
Top achievements
Rank 1
Laszlo asked on 20 Jan 2015, 03:24 PM
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.

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 22 Jan 2015, 12:55 PM
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!
 
0
Laszlo
Top achievements
Rank 1
answered on 22 Jan 2015, 02:14 PM
Hi!

Thanks, do you have plans to make it behave like grid's toolbar?
0
Dimiter Madjarov
Telerik team
answered on 22 Jan 2015, 04:18 PM
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!
 
Tags
TreeList
Asked by
Laszlo
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Laszlo
Top achievements
Rank 1
Share this question
or