Hi,

In my page I have a formView with <ItemTemplate>, <EditItemTemplate> and <InsertItemTemplate>. In the <ItemTemplate> I have a linkButton "Edit" that, when clicked by the user, should show the FormView in Edit Mode. I have the following:

<asp:LinkButton ID="EditLinkButton" Text="Edit" OnClick="EditLinkButton_Click" runat="server" />

And in the code behind:

Protected Sub EditLinkButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        myFormView.ChangeMode(FormViewMode.Edit)
    End Sub

Using the debug, I see that the EditLinkButton_Click is called and executed normally. However, the FormView mode is not changed. Any ideas why?

Thanks,

Ana

It's working now. =) I added the call to my routine for binding BindMyFormView() and it solved the problem.

Protected Sub EditLinkButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    myFormView.ChangeMode(FormViewMode.Edit)
    BindMyFormView()
End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.