RadAjaxManager making ajax calls only first time

6 posts, 0 answers
  1. Kalyan
    Kalyan avatar
    7 posts
    Member since:
    Aug 2010

    Posted 19 Jul 2011 Link to this post

    Hi,

    I have a user control in which I am using a RadTabStrip & RadGrid. On tab click I have to update the grid. 

    So to ajaxify I am using RadAjaxManager as below
    <telerik:RadAjaxManager ID="radAjaxMgr" runat="server" EnableAJAX="true" EnablePageHeadUpdate="false" EnableViewState="false" >
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="radTabStripInd">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="radTabStripInd" />
                        <telerik:AjaxUpdatedControl ControlID="radGrid" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

    When I click on the tab for first time the grid gets refreshed but after that none of the tab click event fire. But when I remove "radTabStripInd" from updated controls the grid refreshes for every tab selection but radTabStrip tab does not change to selected state.

    Note: If i use a RadAjaxManager on a master page and RadAjaxManagerProxy on usercontrol everything works but I see the performance issue ( 6 -8 sec to refresh the grid).

    Can you please let me know how to fix this issue?

    Regards,
    Kalyan


  2. Genti
    Admin
    Genti avatar
    107 posts

    Posted 20 Jul 2011 Link to this post

    Hello Kalyan,

    Thank for contacting us.

    Is the RadGrid inside the RadTab strip?
    If so you do not need to specify both as update controls in the AjaxManager definition.
    |nstead you can leave the outer control be as an UpdatedControl(in this case the RadTabStrip) and the grid would also be updated.

    Regarding the performance issue. Changing the RadAjaxManager to RadAjaxManagerProxy won't change the object reference as it is the same AjaxManager that gets called in both cases. I assume the issue in this case is the one that I described previously.

    A good practise would be to define the AjaxManager on a MasterPage and have an AjaxManagerProxy in the child pages.Now, your definition in the user control would look like this:
    <telerik:RadAjaxManagerProxy ID="radAjaxMgr" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="radTabStripInd">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="radTabStripInd" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>
    Assuming that you already have a RadAjaxManager defined in the parent page.


    Hope this helps.

    All the best,
    Genti
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jayatirtha
    Jayatirtha avatar
    1 posts
    Member since:
    Jun 2011

    Posted 07 May 2012 Link to this post

    Hi Genti  
    ,


    i m binding the Column Dynamically to the radGrid
    and below is my code in User Control(test.ascx)
    and i have loaded the user Control(test.ascx) in Test.ASPX page

    problem i m facing is when RadGrid loads Test.ASPX page loads
    when i click on Any button ( sorting , pagination , search ) first time it Works perfectly (ajaxifing the grid)
    but after that event none of the button is going to work.
    none of the click works.




    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>   

     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rgIncentive">
                    <UpdatedControls>
                        
                        <telerik:AjaxUpdatedControl ControlID="rgIncentive" LoadingPanelID="RadAjaxLoadingPanel1">
                        </telerik:AjaxUpdatedControl>

                    </UpdatedControls>
                </telerik:AjaxSetting>         
            </AjaxSettings>
        </telerik:RadAjaxManager>


        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />


        <telerik:RadGrid ID="rgIncentive" runat="server" AllowFilteringByColumn="True" 
            AllowPaging="True" AllowSorting="True"   Skin="WebBlue" 
            AutoGenerateColumns="false" ShowGroupPanel="True"  >
        </telerik:RadGrid>


    Regards
    Jay
  5. Dave
    Dave avatar
    2 posts
    Member since:
    Aug 2010

    Posted 12 Sep Link to this post

    I'm having the same issue but found something that may shed some light on the problem. My ajax call is updating a repeater. Even though I can't see the new value on the page it is there. By that I mean if I press control-F to open a search window and search for the new value, the found box says it found it. Although it doesn't get highlighted and I can't see it. If I do a view source on my browser it shows up in the source view. Anyone know what that means?
  6. Dave
    Dave avatar
    2 posts
    Member since:
    Aug 2010

    Posted 12 Sep in reply to Dave Link to this post

    One more thing to add to my above post. If you do a Control-F for Search or View Source as stated above you must be using Chrome, did not do it in I.E.. I'm using Chrome Version 52.0.2743.116 m (64-bit). 
  7. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 15 Sep Link to this post

    Hello,

    If you would like to Ajax-enable a Repeater control try to wrap it on a Panel and add that Panel to the AjaxSettings.

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
      
    <asp:Panel ID="Panel1" runat="server">
        <asp:Repeater ID="Repeater1" runat="server">
            <ItemTemplate>
                      . . .
            </ItemTemplate>
        </asp:Repeater>
    </asp:Panel>


    Regards,
    Viktor Tachev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017