How To Hide The Command Column Of The Kendo Grid In jQuery?

In this article, I’m gonna tell you how can we hide the command column of the kendo grid in jQuery. So let’s start it.

columns.command.visible

We can use the “visible” property of the command column to hide or show them.

command: [{
    text: "",
    click: DeleteCurrentRow,
    imageClass: "k-icon k-i-delete",
    name: "Delete",
    visible: function () {
        if (TotalRecordCount == 1) {
            return false;
        }
        else {
            return true;
        }
     }
}]

In the above example, I’m hiding the delete command column when the total record count is 1. Because I don’t want to let users delete the last record. When the total records of the grid are more than 1 then the delete command will be visible.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe

Select Categories