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

Is it possible to add custom items to the ColumnMenu on the grid?

4 Answers 641 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Catherine
Top achievements
Rank 1
Catherine asked on 18 Jul 2018, 01:42 PM

Right now it the ColumnMenu() is enabled for a grid by default it shows:

  • Sort Ascending
  • Sort Descending
  • Columns
  • Filter

Is it possible to add custom items to this list?

4 Answers, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 19 Jul 2018, 07:41 PM
Hi Catherine,

It is possible to add new items to the Kendo menu using the append() method as shown in the Menu / API demo. When used in combination with the grid's columnMenu, the right approach would be to wire to the columnMenuOpen event and add the desired amount of additional menu items.

I have created a Sample Dojo Project in order to better clarify the columnMenuOpen event suggestion - Custom Column Menu Dojo.

I hope these directions will prove to be helpful for your specific case. If you have further queries, do not hesitate to contact us.

Regards,
Tsvetomir
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Catherine
Top achievements
Rank 1
answered on 24 Jul 2018, 11:52 AM

Hi Tsvetomir,

Thank you, yes it was helpful. I'd also like to know if it is possible to add to that list for only one column and to add an icon.

Thanks,

Catherine

0
Accepted
Tsvetomir
Telerik team
answered on 26 Jul 2018, 03:31 PM
Hi Catherine,

I am glad to hear that the previously mentioned suggestions have proved helpful.

Straight to the point, it is possible to customize the list only for the column and add an icon to it. Note that you can include not only an icon, but also an image URL.

I modified the sample from my previous response and applied the requirements you have requested for. You can find the Dojo project here: Add List Item to Only One Menu. The list item is added only for the ShipCountry column.

Please have a look at the sample and see whether it meets your requirements.

Best regards,
Tsvetomir
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Catherine
Top achievements
Rank 1
answered on 26 Jul 2018, 05:16 PM
Thank you for your help; your examples are great!
Tags
Grid
Asked by
Catherine
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Catherine
Top achievements
Rank 1
Share this question
or