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

Why is Ajax happening when not set up?

3 Answers 64 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Lenny_shp
Top achievements
Rank 2
Lenny_shp asked on 12 Mar 2010, 12:26 AM
2009.3.1503.35
I have a main page with AjaxMgr, and that loads the user control.

<div id="divPlaceHolder" runat="server" > 
      <asp:PlaceHolder ID="myPlaceHolder" runat="server"></asp:PlaceHolder> 
</div> 

I do not have Ajax set up from myPlaceHolder to myPlaceHolder, or divPlaceHolder to divPlaceHolder.
I do have a menu on the main page to updates divPlaceHolder so it shows the User Control.

<telerik:AjaxSetting AjaxControlID="mnuFunction"
    <UpdatedControls> 
          <telerik:AjaxUpdatedControl ControlID="divPlaceHolder" /> 
    </UpdatedControls> 
</telerik:AjaxSetting>   

However in the user control (I do not have AjaxMgrProxy set up), if there is autopostback in its child control, it'll do an Ajax update.

Is that expected?   I would have assumed that I have to use AjaxMgrProxy to set up Ajax within User Control but it seems to be doing that by its own?

3 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 16 Mar 2010, 01:05 PM
Hi Lenny_shp,

The described behavior is expected. Because when a controls is ajaxified with RadAjax and updated via ajax, an ajax panel is wrapped around it.
To overcome that behavior you can handle the RadAjaxManager AjaxSettingsCreated event as shown below:

void manager_AjaxSettingCreated(object sender, AjaxSettingCreatedEventArgs e)
{
    if (e.Updated == divPlaceHolder)
    {
        e.UpdatePanel.ChildrenAsTriggers = false;
    }
}


Regards,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Lenny_shp
Top achievements
Rank 2
answered on 16 Mar 2010, 09:44 PM
Thanks, could this be a property of AjaxSetting for future?

<telerik:AjaxSetting AjaxControlID="cboxyz"  ChildrenAsTriggers="false">
0
Iana Tsolova
Telerik team
answered on 17 Mar 2010, 03:37 PM
Hi Lenny_shp,

Indeed, this is a good idea and I will share it with our developers so they could check it out and consider implementing such a property.

Best wishes,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Ajax
Asked by
Lenny_shp
Top achievements
Rank 2
Answers by
Iana Tsolova
Telerik team
Lenny_shp
Top achievements
Rank 2
Share this question
or