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

How to use ajax in this scenario?

3 Answers 57 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Sayid s Yoshi
Top achievements
Rank 1
Sayid s Yoshi asked on 03 Jul 2009, 01:23 AM
3 Item,
default.aspx, grid.ascx, popup.aspx

default if the main page contains the grid.ascx
grid.ascx has only a radGrid with column
            <telerik:GridHyperLinkColumn Text="Deposit" UniqueName="deposit" DataNavigateUrlFields="Username" HeaderText="Point" 
                DataNavigateUrlFormatString="javascript:OpenUpdatePoint('{0}',1);"
            </telerik:GridHyperLinkColumn> 

When click column item, a popup radWindow will prompted using popup.aspx

I have add the follow ajax Manager code in default.aspx and callback javascipt function when popup.aspx radWIndow close.
and I sure that the javascript
        var ranMgr = $find('<%= RadAjaxManager.GetCurrent(this).ClientID %>'); 
        radMgr.ajaxRequest("Rebind"); 
runs properly.

But after ajaxRequest, the  OnAjaxRequest="TheRadAjaxManager_AjaxRequest" didnt fired as I expected.

In this case, what the code in RadAjaxManger should be set? my one is
        <telerik:AjaxSetting AjaxControlID="AgentRadGrid"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="UserRadTabPage" LoadingPanelID="TheRadAjaxLoadingPanel" /> 
                <telerik:AjaxUpdatedControl ControlID="AgentRadGrid" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
AgentRadGrid is the grid name need to refresh, what should be put in the AjaxControlID?

Thanks a lot!!

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 03 Jul 2009, 10:44 AM
Hello Sayid,

In order to achieve the desired functionality, you should change your code as shown bellow:
ASPX:
      <telerik:AjaxSetting AjaxControlID="RadAjaxManager">    
            <UpdatedControls>    
                <telerik:AjaxUpdatedControl ControlID="UserRadTabPage" LoadingPanelID="TheRadAjaxLoadingPanel" />    
                <telerik:AjaxUpdatedControl ControlID="AgentRadGrid" />    
            </UpdatedControls>    
        </telerik:AjaxSetting> 

I hope this helps.

All the best,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sayid s Yoshi
Top achievements
Rank 1
answered on 06 Jul 2009, 12:57 AM
Why the AjaxControlID should be set to "RadAjaxManager" ?
<telerik:AjaxSetting AjaxControlID="RadAjaxManager"

Thanks a lot~
0
Pavlina
Telerik team
answered on 06 Jul 2009, 04:20 PM
Hello,

When an AJAX request is triggered using AjaxRequest function from the client, the AJAX Manager itself should be set as the AJAX initiator updating the corresponding control.
For more information you can check out the below demo and article:
Window Editing (review the ajax settings there)
Client-Side API

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
Sayid s Yoshi
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Sayid s Yoshi
Top achievements
Rank 1
Share this question
or