Custom command in kendo grid with image only

2 posts, 1 answers
  1. Jairo
    Jairo avatar
    6 posts
    Member since:
    Mar 2017

    Posted 17 May 2017 Link to this post


    I am trying to add a custom command to my Kendo Jquery grid and it works well if I just add text. Now I want to replace the text with an icon defined in a class and it works fine as long as there is some text defined but if I remove the command name or text then I get his error:

    Uncaught Error: Custom commands should have name specified

    So is there a way to define a custom command and "hide" the command text/name so only the image defined in the css class is displayed?

    Here is the line where I defined my custom command:

    columns: [
                { command: { className: "fa fa-pencil fa-fw", click: editInformation } },



  2. Answer
    Preslav avatar
    569 posts

    Posted 19 May 2017 Link to this post

    Hello Jairo,

    Indeed, a name should be specified for the commands.

    A possible workaround is using a name of a single space or the non-breaking space character. For example:
    • text: " "
    • text: " "

    Additionally, a runnable example of the above is available in this Dojo:

    Please, give the above a try and let me know if you require any further assistance.

    Telerik by Progress
    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.
Back to Top