I have a FormView:
<asp:FormView ID="fvReport" runat="server" DefaultMode="ReadOnly" AllowPaging="false" OnModeChanging="fvReport_ModeChanging" DataKeyNames="id"> protected void fvReport_ModeChanging(Object sender, FormViewModeEventArgs e) { switch (e.NewMode) { case FormViewMode.Edit: fvReport.AllowPaging = false; break; } }
in ItemTamplate I installed LinkButton:
<asp:LinkButton ID="lbEdit" runat="server" CausesValidation="true" CommandName="Edit" CommandArgument='<%# Eval("id") %>'></asp:LinkButton>
Of course, FormView has an EditItemTemplate section.
When I click the button, the FormView updates and stays in ReadOnly. What am I doing wrong?
DmitryB
source share