<asp:DataGrid id='DataGrid1' onItemDataBound='ItemDB' runat='server'></asp:DataGrid>
VB.NET
protected Sub ItemDB (ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs)
e.Item.Cells(0).Visible = False
End Sub
C#
protected void ItemDB (object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
e.Item.Cells[0].Visible = false;
}
Share with