I found a solution and in case that someone else has the same problem just go to grid view and select the event RowCreated and after that write the code as following:
protected void gvGridView_RowCreated(object sender, GridViewRowEventArgs e)
{
if ((Session["SessionName"] != null ? (string)Session["SessionName"] : "") == "SomeText")
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].CssClass = "hidden";
}
else if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Cells[0].CssClass = "hidden";
}
}
}
Thank you all.