KendoUI : Hiding Columns

Posted by Salvatore Di Dio On jeudi 2 février 2012 2 commentaires
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);
        },
()

2 commentaires:

Guillaume BADIN a dit…

Hello on s'est vu ce matin dans le métro.

On se verra peut être au prochain paris js!!

--
BADIN Guillaume
CTO @ www.WebUbe.com

Salvatore Di Dio a dit…

Ce sera avec un grand plaisir :-)
Bonne continuation pour ton projet