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

Can't ajaxify specific control

1 Answer 49 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
TonyG
Top achievements
Rank 1
TonyG asked on 31 May 2010, 10:08 PM
2010.1.309.35 : I have an asp:Label that should be updated with a server-side calculation when the user changes the value in a RadNumericTextBox. I can't get Ajax to do the update. 

The page structure is as follows:
  • UserControl > Div > Div > Table > TR >TD > Label "Balance"
  • UserControl > Div > RadTabStrip > Tabs > Tab
  • UserControl > Div > RadMultiPage > RadPageView > asp:Panel > Div > Table > TR > TD > RadNumericTextBox "Qty".

 

<telerik:RadNumericTextBox ID="Qty" Width="80px" runat="server" Type="Number"    
  NumberFormat-DecimalDigits="0"      
  OnTextChanged="Qty_TextChanged" CausesValidation="True" AutoPostBack="true" >     
  <NumberFormat DecimalDigits="0" />     
</telerik:RadNumericTextBox>   

I'm trying to get the RadAjaxManagerProxy to flag the label for update in response to a change in the textbox, and when configuring the proxy it all looks OK. But the resulting markup only ajaxifies the TabStrip and RadMultiPage - it does not define the textbox as a change source:
<telerik:RadAjaxManagerProxy ID="RAMP1" runat="server">  
  <AjaxSettings> 
    <telerik:AjaxSetting AjaxControlID="RadTabStrip1">  
      <UpdatedControls> 
        <telerik:AjaxUpdatedControl ControlID="Balance" /> 
        <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> 
      </UpdatedControls> 
    </telerik:AjaxSetting> 
    <telerik:AjaxSetting AjaxControlID="RadMultiPage1">  
      <UpdatedControls> 
        <telerik:AjaxUpdatedControl ControlID="Balance" /> 
        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> 
      </UpdatedControls> 
    </telerik:AjaxSetting> 
  </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 

OK, since the textbox is a component in the tree under the other panels, I can understand if it doesn't want to redundantly ajaxify the textbox too. But the server function occurs and the label is not updated afterward. So what else do I need to do?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 03 Jun 2010, 01:36 PM
Hi TonyG,

I suggest that you creat an ajax setting where the RadNumericTextBox updates the desired Label dynamically. You can do that in the Page_Load or Page_PreRender event handler as described here.

Check it out and let me know how it goes.

Sincerely yours,
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
TonyG
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or