Wednesday, 21 January 2015

How to remove the Column of Gridview using javascript


var grid = 
document.getElementById("<%=Gridview1.ClientID %>");
   if (grid.rows.length > 0)
     {
         for (i = 0; i < grid.rows.length; i++)
          {  
           if(grid.rows[i].cells[2] != null)
             {
                grid.rows[i].cells[2 ].style.display = "none";
                          
                    }
                 }
                  
              }

No comments:

Post a Comment