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

What is the replacement for imageClass for custom commands?

2 Answers 225 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anton
Top achievements
Rank 1
Anton asked on 11 Jul 2017, 03:27 AM

Hello,

After update to the latest kendo version imageClass for custom commands seems to be not working anymore, what is the replacement for this?

Thanks

2 Answers, 1 is accepted

Sort by
0
Orlin
Telerik team
answered on 12 Jul 2017, 06:47 AM
Hello Anton,

As of R1 2017 the Kendo UI widgets switched from using image-based icons to font-based ones. That resulted in some changes in the functioning of the widgets as well as their rendering. I believe the imageClass property no longer exists for the custom command button in the Grid for that reason. To replace it there is now the className property which adds a class name to the custom command button.

To properly add a Kendo UI icon however, you either have to do heavy restyling of the button or just use a script to insert a span with the Kendo UI icon classes before the button text.

I have created a dojo example with one possible way of doing this with a script called by the dataBound event of the Grid. You can find it here: http://dojo.telerik.com/IduFUp

You can find a complete list of the built-in Kendo UI font icons and their class names here: http://docs.telerik.com/kendo-ui/styles-and-layout/icons-web



Regards,
Orlin
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Anton
Top achievements
Rank 1
answered on 12 Jul 2017, 09:20 AM

Hello Orlin,

Thanks for your response and suggestion. Actually I was lucky to find that iconClass does needed job for me. Thanks anyways!

Anton

Tags
Grid
Asked by
Anton
Top achievements
Rank 1
Answers by
Orlin
Telerik team
Anton
Top achievements
Rank 1
Share this question
or