This trick might save you some time when you want to hide GridView coulmn and keep its column value. By default if you set the attribute visible="false" like in example below you will also lose data of that column. Apperenlty the whole column and its value is removed in GridView.
Example 1:
<asp:BoundField Visible="false" DataField="Odobren" HeaderText="Odobren" SortExpression="Odobren" />
My workaround is that you set in your style class to hide your column and then use it in your code to hide your column from the users.
Example 2:
.gridViewHiddenColumn
{
display:none;
}
<asp:BoundField DataField="Odobren" HeaderText="Odobren" HeaderStyle-CssClass="gridViewHiddenColumn" itemstyle-cssclass="gridViewHiddenColumn" SortExpression="Odobren" />
Example 3:
If you want to do in you code behind, you can call an event GridView_RowCreated and set visibility of the row to false.
e.Row.Cells[13].Visible = false;
76f2038b-f758-46b6-a955-1591c4fcd090|0|.0