Grid View Doubt

  • Thread starter Thread starter Charmingpri
  • Start date Start date
Hi,

If it is a BoundField, by setting its ReadOnly property as below.

<asp:BoundField ........... ReadOnly="true" />

If it is a TemplateField, by putting readonly controls, instead of a control
like CheckBox, TextBox, etc. in "EditItemTemplate".

<asp:TemplateField ...........>
<ItemTemplate>
<asp:Label Text='<%# Eval("FieldName") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:Label Text='<%# Eval("FieldName") %>' />
</EditItemTemplate>
</asp:TemplateField>

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com
http://www.propeople.dk
 
Back
Top