Thursday, 20 December 2012

Hide specify column in Kendo grid

Some of my Coolidge tried to hide one specify column in kendo grid table.

Finally I got the correct solution for the same.

Assuming #grid is already bound as the kendo grid, you can use the hide Column function

Your bound column is like
{ 
    field: "CreatedDate",
    title: "Create Date",

}
--------------------------------
Script for hiding the column

var grid = $("#grid").data("kendoGrid");
grid.hideColumn("CreatedDate");

or 
$("#grid").data("kendoGrid").hideColumn("CreatedDate");

you can supply the bound field or column index in hideColumn method

This will hide both the header and data column.There is also a showColumn
function when you need to show the column as well.



Thanks
V. K. Rajput
Fokat RnD Team member
 

1 comment:

  1. nice ,
    thanx frnd , I am searching this for last two days,
    but your info works
    thanx
    Keep up your good work

    ReplyDelete