Hi telerik team!
I have a problem with radajaxmanager, this is my scenario:
I have a default page and user control. On default page I have a radajaxmanager and on my usercontrol a radajaxmanagerproxy.
On my user control I have this:
In my markup also have this:
But is doing a full postback to all the page. How could I solve this???
Thanks!!!!
I have a problem with radajaxmanager, this is my scenario:
I have a default page and user control. On default page I have a radajaxmanager and on my usercontrol a radajaxmanagerproxy.
On my user control I have this:
<telerik:RadAjaxManagerProxy ID=
"AjaxManagerProxyTools"
runat=
"server"
><br><AjaxSettings><br><telerik:AjaxSetting AjaxControlID=
"Timer"
><br><UpdatedControls><br><telerik:AjaxUpdatedControl ControlID=
"PanelTools"
/><br></UpdatedControls><br></telerik:AjaxSetting><br><telerik:AjaxSetting AjaxControlID=
"LinkButton"
><br><UpdatedControls><br><telerik:AjaxUpdatedControl ControlID=
"PanelTools"
/><br></UpdatedControls><br></telerik:AjaxSetting><br></AjaxSettings><br></telerik:RadAjaxManagerProxy>
<asp:Timer ID=
"Timer"
runat=
"server"
Interval=
"10000"
OnTick=
"Timer_Tick"
Enabled=
"false"
></asp:Timer><br><asp:Panel ID=
"PanelTools"
runat=
"server"
><br><div runat=
"server"
><br><asp:LinkButton ID=
"LinkButton"
runat=
"server"
CausesValidation=
"false"
onmouseover=
"OnClientMouseOver(this)"
onmouseout=
"OnClientMouseOut(this)"
><br></asp:LinkButton><br></div><br></asp:Panel>
<script type=
"text/javascript"
><br><span style=
"font-size: 11px; line-height: 1.4;"
>
function
OnClientMouseOver(sender, eventArgs) {</span><br>
var
Open =
'<%= this.IsOpen %>'
;<br>
if
(Open ==
false
) {<br> __doPostBack(
'Open'
);<br> }<br> }<br><br>
function
OnClientMouseOut(sender, eventArgs) {<br> __doPostBack(
'Close'
);<br> }<br><br></script>
But is doing a full postback to all the page. How could I solve this???
Thanks!!!!
8 Answers, 1 is accepted
0
Joan
Top achievements
Rank 1
answered on 09 May 2013, 07:38 AM
Hello Telerik team, could you please help me with this escenario?
I have looked on other post but cant find the same scena, hope can support me! Thanks!
I have looked on other post but cant find the same scena, hope can support me! Thanks!
0
Joan
Top achievements
Rank 1
answered on 09 May 2013, 12:09 PM
Please telerik team, could you advice me or give me a small example how could I avoid a full postback on my user control when using proxymanager? and I call i at clientside? Thanks!
0
Hello Joan,
I am attaching sample project illustrating ajaxified controls in a user control.
Try the approach in the project or in this online demo and see if it is working for you.
Additionally, you could find this topic for RadAjaxManager and this topic for RadAjaxManagerProxy helpful.
I hope this information would be helpful to you.
All the best,
I am attaching sample project illustrating ajaxified controls in a user control.
Try the approach in the project or in this online demo and see if it is working for you.
Additionally, you could find this topic for RadAjaxManager and this topic for RadAjaxManagerProxy helpful.
I hope this information would be helpful to you.
All the best,
Victor Tachev
the Telerik team
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 their blog feed now.
0
Joan
Top achievements
Rank 1
answered on 15 May 2013, 07:12 AM
Hi Victor, I have read the topic for RadAjaxManager and this topic for RadAjaxManagerProxy. Sorry if I didnt explain myself. The fact is I have on my user control a proxymanager, the panel on my user control will be updated by a timer (I want an ajax post). I remove the button funcionality because was getting crazy with that. But well, the fact is I have a master page and in my master page I have this user control, because I want to show it in whole site, but in master page I dont have any radajaxmanager, but in most of the rest pages I have an ajaxmanager? Is that possible?
Thanks!!!
Thanks!!!
0
Hi Joan,
When you are using MasterPage it is recommended you place the RadAjaxManager control on the highest hierarchy level of pages (in this case the MasterPage). This way all possible scenarios could be handled. This way you would be able to Ajax-ify controls in the MasterPage and in the content pages. If you need more information about using RadAjaxManager with MasterPage you could check this article. Also information on RadAjaxManager and WebUserControls is available here.
I am attaching a modified project that illustrates this approach. It is using a Timer control in the Default page. The Timer updates a control in a WebUser control. Note that in this case the RadAjaxManager on the Default page handles the Ajax request.
If you have the timer control in the WebUser control the settings would be in the RadAjaxManagerProxy in the UserControl page.
Client-side events are also added in the UserControl that are changing the text of a label.
I hope this helps.
All the best,
When you are using MasterPage it is recommended you place the RadAjaxManager control on the highest hierarchy level of pages (in this case the MasterPage). This way all possible scenarios could be handled. This way you would be able to Ajax-ify controls in the MasterPage and in the content pages. If you need more information about using RadAjaxManager with MasterPage you could check this article. Also information on RadAjaxManager and WebUserControls is available here.
I am attaching a modified project that illustrates this approach. It is using a Timer control in the Default page. The Timer updates a control in a WebUser control. Note that in this case the RadAjaxManager on the Default page handles the Ajax request.
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"Timer"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"PanelTools"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
If you have the timer control in the WebUser control the settings would be in the RadAjaxManagerProxy in the UserControl page.
Client-side events are also added in the UserControl that are changing the text of a label.
I hope this helps.
All the best,
Victor Tachev
the Telerik team
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 their blog feed now.
0
Joan
Top achievements
Rank 1
answered on 17 May 2013, 11:48 AM
Hi Victor.
My scenario is I have a Master Page, multiple Content Pages and user controls.
I have to add in my master page an RadAjaxManager and iin my user controls and content pages if need proxymanagers? But in the code design from my master page I have to add the controls I want to update? really dont understand? Thank!
My scenario is I have a Master Page, multiple Content Pages and user controls.
I have to add in my master page an RadAjaxManager and iin my user controls and content pages if need proxymanagers? But in the code design from my master page I have to add the controls I want to update? really dont understand? Thank!
0
Edward
Top achievements
Rank 1
answered on 19 May 2013, 02:21 AM
Joan,
Instead of
__doPostBack('Close');
call
__doPostBack(eventTarget, eventArgument)
where eventTarget is client ID of control that has settings to be AJAX initiator.
Or $find("<%=AjaxManager1.ClientID%>").ajaxRequestWithTarget(eventTarget, eventArgument)
Or $find("<%=AjaxManager1.ClientID%>").ajaxRequest(arguments)
-Ed
Instead of
__doPostBack('Close');
call
__doPostBack(eventTarget, eventArgument)
where eventTarget is client ID of control that has settings to be AJAX initiator.
Or $find("<%=AjaxManager1.ClientID%>").ajaxRequestWithTarget(eventTarget, eventArgument)
Or $find("<%=AjaxManager1.ClientID%>").ajaxRequest(arguments)
-Ed
0
Hi Joan,
The scenario you have allows the controls in your application to be updated in different ways. You could have:
The scenario you have allows the controls in your application to be updated in different ways. You could have:
- control in the Master page updating a control in a content page
- control in a content page updating another control in the same page
- control in a one content placeholder updating control in another content placeholder
In each case it is recommended you place the RadAjaxManager in your Master page so it can Ajax-ify every control in your application. In a situation where a control in your Master page updates a control in a content page and vice verse you should set the controls' IDs in the RadAjaxManager settings.
When a control in one of your content pages updates another control in the same content page you should set the settings of the RadAjaxManagerProxy in this content page. If you need more information you could find this topic helpful.If you have a scenario where a control is places inside one ContentPlaceHolder which updates a control placed in another ContentPlaceHolder on that page you could use the event bubbling approach to Ajax-ify the controls and add settings to the RadAjaxManager programmatically. The mentioned approach is illustrated in this article.
Give these suggestions a try and you should not have problems achieving your goal.
Regards,
Victor Tachev
the Telerik team
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 their blog feed now.