RadAjaxManager HELP

3 posts, 0 answers
  1. Peter Karcol
    Peter Karcol avatar
    3 posts
    Member since:
    Nov 2007

    Posted 10 Jul 2013 Link to this post


    I am having a problem getting RadAjaxManager_AjaxRequest to update a control on the page.  Here is my scenario...

    I have a page with RadAjaxManager declared as below...

    <telerik:RadAjaxManager ID="ramMain" runat="server" OnAjaxRequest="RamMain_AjaxRequest">

    I have a standard asp:Repeater bound to a datasource server side, it is wrapped in an asp:Panel and it is laid out like so..

    <div runat="server" id="caseStudyDisplayPanel" class="span6">
    <asp:Repeater ID="rptrCaseStudies" runat="server" ClientIDMode="Static">
    <ul id="List">
    <div><%# DataBinder.Eval(Container.DataItem, "Name") %></div>

    Above the repeater I have a "Add New" button which pops a RadWindow, Containing a UserControl with a RadGrid.  Each Row in the popup grid has a "Select" button, which triggers the RowSelected event.  On RowSelected I do some small javascript functions then hand off to the ajaxManager.ajaxRequest request via javascript passing over the info from the selected row.  So far so good, everything works to this point...the server side method (RamMain_AjaxRequest) gets fired and runs perfectly.  The last thing I do in the request is add my newly selected row to the datasource, and rebind the repeater.  On rebind (if I add a break point) I see exactly what I am expecting with the newly added item included in the datasource collection.  Problem is the screen never updates.  If I save at this point, and come back the item is there, so I know it is getting added, just not displayed.

    What should be added to the AjaxSetting to accomplish this?  It seems I have tried every combination of controls and cannot see the update.  Here is my current seetings (which aren't working)

    <telerik:AjaxSetting AjaxControlID="ramMain">
                        <telerik:AjaxUpdatedControl ControlID="caseStudiesWrapper" />
                        <telerik:AjaxUpdatedControl ControlID="rptrCaseStudies" />
    <telerik:AjaxSetting AjaxControlID="caseStudiesWrapper">
                        <telerik:AjaxUpdatedControl ControlID="caseStudiesWrapper" />
    <telerik:AjaxSetting AjaxControlID="rptrCaseStudies">
                        <telerik:AjaxUpdatedControl ControlID="rptrCaseStudies" />

    Thanks So Much!!
  2. Peter Karcol
    Peter Karcol avatar
    3 posts
    Member since:
    Nov 2007

    Posted 13 Jul 2013 Link to this post

    Anyone have any ideas?  I'm really stumped here.  I can try to simplify the question...

    If an asp link button pops a radWindow with a usercontrol containing a radgrid, and the radgrid calls back to a javascript function on the parent page, which fires off the ajaxrequest on the server side.  What controls should be configured in the telerik AjaxSettings to update the UI of a asp repeater which is nested in an asp:Panel?

    Maybe that doesn't really simplify it?  Just hoping to ask in such a way that someone can make some sense of it.

  3. DevCraft R3 2016 release webinar banner
  4. Konstantin Dikov
    Konstantin Dikov avatar
    1749 posts

    Posted 15 Jul 2013 Link to this post

    Hello Peter,

    Thank you for contacting us. 

    I have examined your code and your AJAX settings look properly configured. I have created a simple project with one button opening RadWindow with user control in it. In the user control there are two buttons for adding and deleting data in a xml file (with client-side ajaxRequest), using your AJAX settings in the RadAjaxManager,  which works fine on my side. Also in this case you need only one ajax setting which will indicate that the RadAjaxManager will update the Repeater. The updating of the datasource takes place in OnAjaxRequest server-side event. 

    Please take a look at the attached project and see if there are any differences from your logic and let us know if this helps you with your issue.  

    Best Regards,
    Konstantin Dikov
    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.
Back to Top