Thursday, February 2, 2012

KendoUI : Hiding Columns

Here is a little snippet to hide columns on dataBound event

function HideColumn(gridId,numColumn) {    
    $("#" + gridId +  " th:eq(" + numColumn + ")").hide();
    $("#" + gridId +  " td:nth-child(" + (numColumn+1) + ")").hide();
}

$(document).ready(function () {
     $("#grid").kendoGrid({

        dataBound : function(e) {          
             //RegisterGrid($("#grid").data("kendoGrid"));          
             HideColumn("grid",0);
        },
()

No comments:

Post a Comment