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

Custom Column Menu Contents i.e. Buttons

2 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Maizal
Top achievements
Rank 1
Maizal asked on 07 Jan 2021, 06:49 AM

Hello,

I was wondering if you have examples on creating a custom column menu with customizable items within it.

 

Something along the lines of the following link but truly customizable menu options: https://www.telerik.com/kendo-angular-ui/components/grid/api/ColumnMenuTemplateDirective/

 

I would like the column menu to contain 2 buttons, each with it's own event raised and handled. 

Please let me know if this is possible.

 

Thanks.

2 Answers, 1 is accepted

Sort by
0
Maizal
Top achievements
Rank 1
answered on 20 Jan 2021, 07:21 PM
Does anyone have any ideas about this?
0
Martin
Telerik team
answered on 22 Jan 2021, 10:50 AM

Hello Maizal,

Using the kendoGridColumnMenuTemplate is the right way to go when the menu needs to be customized. Basically, the templates allow using any custom code on top of the current implementation.

The code snippet that you are referring to, demonstrate how dedicated column menu components can be used separately, but any custom elements can be added as well, e.g.

  <ng-template kendoGridColumnMenuTemplate let-service="service">
          <kendo-grid-columnmenu-sort [service]="service">
          </kendo-grid-columnmenu-sort>
          <button class="k-button">Click</button>
        </ng-template>

https://stackblitz.com/edit/angular-spfidf

I hope this helps.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Maizal
Top achievements
Rank 1
Answers by
Maizal
Top achievements
Rank 1
Martin
Telerik team
Share this question
or