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

toolbar-dropdownbutton

1 Answer 768 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 01 Apr 2020, 01:13 PM

Hi,

I couldn't find anything related to this so thought I'd just drop a question in here. I'm currently working with the editor and I need to override the template for the items in the popup when the toolbar button is clicked; default only allows you to pass text and/or icon.

I'm aware you can do this with regular kendo drop down lists by using ng-template within the component selectors in html, however after playing around with this I am unable to replicate that behaviour using the toolbar-dropdownbutton.

Have I missed something in the docs that explains a strategy for doing this, or is it the case that I would need to implement a custom toolbar control to be able to have this functionality?

any help would be appreciated.

Thanks

1 Answer, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 03 Apr 2020, 07:28 AM

Hi Matt,

Indeed, you have turned in the right direction. The toolbar-dropdownbutton and the regular DropDownList component are two different components. Thus their features aren't shared. Thus, as you have inferred, the way to add a custom layout to the popup of a responsive Toolbar is to implement a Custom Control Type:

https://www.telerik.com/kendo-angular-ui/components/toolbar/custom-control-types/

The last example on the referenced article above demonstrates how to add a Kendo DropDownList Component as a custom tool to a responsive ToolBar by using both the toolbarTemplate and popupTemplate. I am pasting it here for reference:

https://stackblitz.com/edit/angular-dxpp9t?file=app/app.component.ts

Please let me know in case further assistance is required for this case. Thank you.

Regards,
Svetlin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Editor
Asked by
Matt
Top achievements
Rank 1
Answers by
Svet
Telerik team
Share this question
or