Datatable Column <Column name>is readonly.Error while updating
<p>I have created a datatable.There i have column name "TotalCases".When i am trying to update the row its getting an error "Column TotalCases is readonly".I have set ReadOnly=false.Still i am getting this error</p>

<pre><code>DataTable dtStock = new DataTable();
DataColumn dcTotalCases = new DataColumn("TotalCases");
dcTotalCases.ReadOnly = false;
dtStock.Columns.Add(dcTotalCases);

  DataRow drStock = dtStock.Rows.Find(Datakey);
  drStock["TotalCases"] = ((System.Web.UI.WebControls.TextBox)item.FindControl("txtOrderCases")).Text;
</code></pre>

<p>I am tring to retain values in the textbox of template column in the grid.I am trying the follwing link <a href="http://www.ilearnttoday.com/c-aspnet-gridview-how-to-keep-modified-data-of-template-fields-when-paging-is-enabled" rel="nofollow">Link</a></p>
