Last Updated: 05 Aug 2019 14:38 by ADMIN
Created on: 30 Jul 2019 08:07
Category: Grid
Type: Feature Request
Column command without text/icon only

It would be nice, if you can create a build-in property or function to create icon-only buttons/commands in a grid.

Actually it requires some workaround to realize this.


This Example create an edit button with the k-button-icontext class, but i want only an k-button-icon button. The destroy button gets the button name as default text.

    .Columns(columns =>
        columns.Bound(p => p.Name).Width(150);
        columns.Bound(p => p.Active).Width(75);
        columns.Command(command => { command.Edit().Text(" "); command.Destroy().Text(""); }).Width(300);
    //.ToolBar(toolbar => toolbar.Create())
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable(p => p.Refresh(true))
    .Resizable(r => r.Columns(true))
    .HtmlAttributes(new { style = "height:450px; width: 100%" })
    .DataSource(dataSource => dataSource
        //.Events(events => events.Error("error_handler"))
        .Model(model => model.Id(p => p.ID))
        .Create(update => update.Action("Admin_Create", "Dashboard", new { id = Model.DashboardId }))
        .Read(read => read.Action("Admin_Read", "Dashboard", new { id = Model.DashboardId }))
        .Update(update => update.Action("Admin_Update", "Dashboard", new { id = Model.DashboardId }))
        .Destroy(update => update.Action("Admin_Destroy", "Dashboard", new { id = Model.DashboardId }))


Alternative it would be ok if the correct css class is given when an empty string is specified.


Thank you


Attached Files:
1 comment
Marin Bratanov
Posted on: 05 Aug 2019 14:38
Hello Christian,

For the time being, you could traverse the grid DOM in the dataBound event and replace the class, provided the button has no text.

I have also added your vote for the following feature that has been there longer and also requests the same (you may want to Follow that too): At this point I cannot say how such toggling of classes would be done to implement this (maybe it would be done by the grid, or maybe a css class option would be exposed on the buttons, or maybe something else). 

Since this request contains a part of the more popular one, I am closing this one to avoid duplication. Anyone with a similar question should comment and vote on the other page - the feature needs to be implemented in the jQuery widget first before it can come to the wrappers anyway.

Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.