If set
visible to false in Gridview template, this column will not be rendered into
html.
<asp:BoundField DataField="ID" HeaderStyle-Width="0px" Visible="false" />
<asp:GridView ID="GridView1" runat="server" onrowdatabound="GridView1_RowDataBound">
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs
e)
{
if (e.Row.RowType != DataControlRowType.DataRow)
return;
e.Row.Cells[1].Visible = false;
}
No comments:
Post a Comment