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

RadAjaxManager / nested Repeaters / RadNumericTextBox

1 Answer 114 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Iron
Iron
Vincent asked on 06 Dec 2019, 09:51 AM
Hi from France,

I've got problem with this case to using RadAjaxManager (see picture)

I've got 3 repeater For : Section, GrpRubrique and Rubrique, all is nested.

my HTML for "section" part is <details><summary>, sample :

<asp:Repeater ID="rptSection" runat="server" ClientIDMode="AutoID">
                  <ItemTemplate>                   
                      <details>                         
                          <summary>
                          <h4>Title section</h4>
                          <div>
                          <asp:repeater id=rptGrpRubrique...
                          ...
                            <telerik:RadNumericTextBox ID="rnt" ClientIDMode="AutoID" ...


All radNumericTextBox not have autoPostback=True (set by codeBehind)
i have dependence by formules must calculate in codeBehind, sample :
Rubrique6 = TVA * (Rubrique1 + Rubrique3 + Rubrique4) and when user change value in Rubrique1,3 or 4 i must postback, calculate and update Rubrique6

Ajaxify All Repeater, with arounded Panel work but, close all my details HTML :

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


example, if i want to add only updated control rubrique6, in my code behind when radNumericTextBox Binding, his ID is always "rnt" and doesn't work :

Dim ctrl As New Telerik.Web.UI.AjaxUpdatedControl
ctrl.ControlID = radTextBox.ID
'ctrl.ControlID = radTextBox.UniqueID
'ctrl.ControlID = radTextBox.ClientID
ram.AjaxSettings.Item(0).UpdatedControls.Add(ctrl)


i've got no solution since many days...

 

Thanks for your help.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 11 Dec 2019, 09:05 AM

Hello Vincent,

 

I hope everything is going well.

Here are my comments about this case:

1. Ensure that the calculation and the entire functionality works without AJAX first:
https://www.telerik.com/support/kb/aspnet-ajax/ajaxmanager/details/get-more-descriptive-errors-by-disabling-ajax

2. Consider changing this implementation to client-side using JavaScript. It will be much efficient and save you the requirement to make postbacks or AJAX requests.

3. Generally, programmatic AJAX settings should be applied in the global Page_Load event handler or the RadTextBoxX_PreRender event handler of the control itself using the following approach:
https://docs.telerik.com/devtools/aspnet-ajax/controls/ajaxmanager/how-to/add-ajaxsettings-programmatically

However, since in your case the dependencies can be too many, it is best to keep the whole main Repeater ajaxified one single time.

I hope these insights will prove helpful to you.

 

Regards,
Eyup
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Ajax
Asked by
Vincent
Top achievements
Rank 1
Iron
Iron
Answers by
Eyup
Telerik team
Share this question
or