How to hide gridview column after databind?

Napple93

New Member
I hide my columns using the solution in following linkHow to hide a TemplateField column in a GridViewHowever this causes problems with update operations, as gridview acts as hidden rows has null value. So how to hide columns after databind?\[code\]protected void begv_OrderDetail_RowCreated(object sender, GridViewRowEventArgs e){ ((DataControlField)begv_OrderDetail.Columns.Cast<DataControlField>().Where(fld => fld.HeaderText == "FileNo").SingleOrDefault()).Visible = "False";}\[/code\]
 
Back
Top