This is a migrated thread and some comments may be shown as answers.

FormView Will Not Go Into Edit Mode w/RadAjaxManager

1 Answer 68 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 26 Jul 2013, 06:08 PM
I have 2 RadTreeViews and a FormView on a form.

When something is clicked from the first TreeView, it populates the second one.  When something is clicked from the second RadTreeView, it populates the FormView.  All of this works perfectly up to here.

When I click the "Edit" link button of the FormView at this point, nothing happens.  Even when i attempt to do it manually from code - nothing happens.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            </telerik:AjaxSetting>
             <telerik:AjaxSetting AjaxControlID="treeSellers">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="lblBuyers" UpdatePanelCssClass="" />
                     <telerik:AjaxUpdatedControl ControlID="treeBuyers" UpdatePanelCssClass="" />
                 </UpdatedControls>
             </telerik:AjaxSetting>
             <telerik:AjaxSetting AjaxControlID="treeBuyers">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="formBuyerDetails" UpdatePanelCssClass="" />
                 </UpdatedControls>
             </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Simple Edit Button on the FormView's ItemTemplate:
<asp:LinkButton ID="link_edit" runat="server" CommandName="Edit">Edit</asp:LinkButton>


Protected Sub formBuyerDetails_ItemCommand(sender As Object, e As FormViewCommandEventArgs) Handles formBuyerDetails.ItemCommand
 
      If (e.CommandName = "Edit") Then
          formBuyerDetails.ChangeMode(FormViewMode.Edit) 'Doesnt Work
      ElseIf (e.CommandName = "Cancel") Then
          formBuyerDetails.ChangeMode(FormViewMode.ReadOnly) 'This probably doesnt either, but I cant even get here
      ElseIf (e.CommandName = "UpdateBuyer") Then
          'UPDATE function here
      End If
  End Sub

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 31 Jul 2013, 03:08 PM
Hello Shawn,

I have tried to reproduce your scenario using as much as possible from your code snippets, but everything is working as expected on my side. 

Please have a look at the attached project and see what differs from your project.

If you are still experience difficulties with implementing your logic, please try to prepare a simple, runnable project that replicates the described issue and send it for further inspection.

 

Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Ajax
Asked by
Shawn
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or