Two ways:
1. In ASPX if the columns are defined:
<asp:BoundField DataField="MyProperty" HeaderText="Int" InsertVisible="False" ReadOnly="True" />
2. In code behind file:
To make the column readonly on editing add this
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
BoundField bound = GridView1.Columns[1] as BoundField;
bound.InsertVisible = false;
bound.ReadOnly = true;
}
Generally, we define the columns of a grid and option 1 should do just fine.