title: how to make a read only textbox in gridview edit mode?
body: <p>I want to make one of the data bound in my gridview uneditable or in my case, I want to make the textbox in edit mode in read only. here is what I have tried but not successful:</p>
  
  <pre><code>TextBox ProductImage = GridView1.Rows[e.RowIndex].FindControl("TextBox1") as TextBox;
          ProductImage.ReadOnly = true;
  </code></pre>
  
  <p>and here is the aspx code:</p>
  
  <pre><code>asp:TemplateField HeaderText="ProductImage" SortExpression="ProductImage"&gt;
          &lt;EditItemTemplate&gt;
              &lt;asp:TextBox ID="TextBox1" runat="server" Text='&lt;%# Eval("ProductImage") %&gt;'&gt;&lt;/asp:TextBox&gt;
          &lt;/EditItemTemplate&gt;
          &lt;ItemTemplate&gt;
              &lt;asp:Image ID="Image1" runat="server" ImageUrl='&lt;%# Eval("ProductImage") %&gt;' /&gt;
          &lt;/ItemTemplate&gt;
          &lt;ControlStyle Width="50px" /&gt;
      &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>can someone help me out? </p>