What is the replacement for imageClass for custom commands?

3 posts, 0 answers
  1. Anton
    Anton avatar
    10 posts
    Member since:
    Aug 2016

    Posted 10 Jul 2017 Link to this post


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


  2. Orlin
    Orlin avatar
    62 posts

    Posted 12 Jul 2017 Link to this post

    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

    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.
  3. Anton
    Anton avatar
    10 posts
    Member since:
    Aug 2016

    Posted 12 Jul 2017 Link to this post

    Hello Orlin,

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


Back to Top