search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Using Read only fields

Asked by LouLou
14 years ago.

Hi. I am having problems using read only fields on with the pop-up event detail - the full code is below but in short

This doesn't work (nothing happens when I press "update"
<asp:BoundField DataField="Job_ID" HeaderText="Job ID" SortExpression="Job_ID" ReadOnly="true" />

This does work but it needs to display without being edited

<asp:BoundField DataField="Job_ID" HeaderText="Job ID" SortExpression="Job_ID" />

Any ideas - Lou Lou
-...--.-...--...--.-...--...--.-...--...--.-...-

<asp:DetailsView
ID="EventDetail"
runat="server"
DefaultMode="Edit"
OnItemUpdated="EventDetail_ItemUpdated"
DataSourceID="SqlDataSourceDetail"
DataKeyNames="id"
AutoGenerateEditButton="True"
OnItemCommand="EventDetail_ItemCommand"
Width="500px"
OnItemUpdating="EventDetail_ItemUpdating"
AutoGenerateInsertButton="True"
AutoGenerateRows="False"
OnItemInserted="EventDetail_ItemInserted"
CssClass="detail"
GridLines="None">
<HeaderStyle HorizontalAlign="Right" />
<Fields>
<asp:BoundField DataField="Job_ID" HeaderText="Job ID" SortExpression="Job_ID" ReadOnly="true" />
</Fields>
</asp:DetailsView>

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.