New to Kendo UI for jQuery? Download free 30-day trial

Disable the Command Button in Grids


Product Progress® Kendo UI® Grid for jQuery
Product Version 2017.3.913


I want to render the command buttons of the Grid cells for the user to see, but to disable them depending on the @User.IsInRole("RoleName") status. I tried to achieve this behavior by using Javascript and adding the k-disabled class but the buttons are still clickable.

How can I disable the command.Edit() or the command.Destroy() button?


Apply the logic on the dataBound event and use jQuery.

  1. Set the k-disabled class.
  2. Only on the disabled buttons, remove the delete and edit specific classes.
    <div id="grid"></div>
          $( ".k-disabled" ).each(function( index ) {
        columns: [
          { field: "name" },
          { command: [{ className: "k-disabled", name: "destroy", text: "Remove" },{ className: "k-disabled", name: "edit", text: "Edit" }] }
        editable: true,
        dataSource: [ { name: "Jane Doe" } ]
In this article