//GridView中隐藏动态生的列
#region 隐藏列
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow
|| e.Row.RowType == DataControlRowType.Header
|| e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Cells[1].Visible = false;
}
}
#endregion