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

RadAjaxManager making ajax calls only first time

5 Answers 193 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Kalyan
Top achievements
Rank 1
Kalyan asked on 19 Jul 2011, 10:59 PM
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


5 Answers, 1 is accepted

Sort by
0
Genti
Telerik team
answered on 20 Jul 2011, 09:44 AM
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!

0
Jayatirtha
Top achievements
Rank 1
answered on 07 May 2012, 01:37 PM
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
0
Dave
Top achievements
Rank 1
answered on 12 Sep 2016, 09:03 PM
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?
0
Dave
Top achievements
Rank 1
answered on 12 Sep 2016, 09:14 PM
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). 
0
Viktor Tachev
Telerik team
answered on 15 Sep 2016, 10:56 AM
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.
Tags
Ajax
Asked by
Kalyan
Top achievements
Rank 1
Answers by
Genti
Telerik team
Jayatirtha
Top achievements
Rank 1
Dave
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or