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

Update label in Ajax Request

7 Answers 212 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
A K
Top achievements
Rank 1
A K asked on 23 Jul 2010, 12:34 PM

I  dynamically load user control as panelBar item. And with the RadAjax proxy in Manager_AjaxRequest I am trying to update Text box and a label on the user control. Text box gets updated but not a label. I have added both controls in Ajax request update controls Mark up.

7 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 23 Jul 2010, 01:44 PM
Can we see a snippet of your page showing your RadAjaxManagerProxy control declaration?
0
A K
Top achievements
Rank 1
answered on 23 Jul 2010, 02:35 PM
I am adding it at run time for both TextBox and a label, following way in panel bar's ItemCreated event.

Private

 

Sub pnlBarAccounts_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadPanelBarEventArgs) Handles pnlBarAccounts.ItemCreated

RadAjaxManagerProxyAcctSetup.AjaxSettings.AddAjaxSetting(RadAjaxManagerProxyAcctSetup, txtFIName)

RadAjaxManagerProxyAcctSetup.AjaxSettings.AddAjaxSetting(RadAjaxManagerProxyAcctSetup, lblFiNameText)

And try to update in following event Text for both these controls. Text box get's udpated but not label. I am assigning same text for both controls

 

Private

 

Sub Manager_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs)

0
Radoslav
Telerik team
answered on 26 Jul 2010, 11:21 AM
Hi A K,

Could you please try adding the following code snippet into the Page_Load event handler and let me know if the issue still persists:
RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(RadAjaxManagerProxyAcctSetup, txtFIName)
RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(RadAjaxManagerProxyAcctSetup, lblFiNameText)

Looking forward for your reply.

Sincerely yours,
Radoslav
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
A K
Top achievements
Rank 1
answered on 27 Jul 2010, 02:43 PM
I can not do this, because of I am adding Ajax binding on a parent page which will have multiple user controls in radpanel items. That’s why I am adding on Panel item-created event.  If work fine on a text box and all other controls except label. I don’t get this.  I am trying to ajaxify each user control at item created level.
0
Radoslav
Telerik team
answered on 30 Jul 2010, 12:00 PM
Hello A K,

To achieve the desired functionality and ajaxify controls dynamically, you need to add controls to the AjaxSettings into event which is occurred every time when the page is created. Could you please try adding the following code snippet into the pnlBarAccounts_ItemCreated and let me know if the issue still persists:
RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(RadAjaxManagerProxyAcctSetup, txtFIName)
RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(RadAjaxManagerProxyAcctSetup, lblFiNameText)

Additionally please check out the following online resources:
http://www.telerik.com/help/aspnet-ajax/ajxusercontrols.html
http://www.telerik.com/help/aspnet-ajax/ajxloadusercontrols.html

Best wishes,
Radoslav
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
A K
Top achievements
Rank 1
answered on 30 Jul 2010, 12:30 PM
I have added above code, No LUCK only text box is getting updated but not a label.
0
Radoslav
Telerik team
answered on 04 Aug 2010, 10:56 AM
Hi A K,

Based on the provided information is hard to determine what is causing the described issue. Could you please send us a small runnable project which demonstrates the issue. You could open a formal support ticket from your Telerik account and attach a ZIP file there. Thus we will be able to we debug the project and provide you with more to-the-point answer.

All the best,
Radoslav
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
A K
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
A K
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or