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

Ajaxifying controls in templates

3 Answers 52 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
ToltingColtAcres asked on 16 Jun 2020, 12:26 AM

What is the proper procedure to ajaxify controls contained in layout templates of RadGrids or Formviews?

e.g. if RadFormView1 contains an itemtemplate which contains a RadGrid, how does one properly configure the RadAjaxManager to ajaxify the grid?

I tried something like this:

01.<telerik:RadAjaxManager runat="server" ID="RadAjaxManager_ManualRequest">
02.    <AjaxSettings>
03.      <telerik:AjaxSetting AjaxControlID="RadFormView_Customers">
04.        <UpdatedControls>
05.          <telerik:AjaxUpdatedControl ControlID="RadFormView_Customers" LoadingPanelID="RadAjaxLoadingPanel_ManualRequest" />
06.        </UpdatedControls>
07.      </telerik:AjaxSetting>
08.      <telerik:AjaxSetting AjaxControlID="RadGrid_Addresses">
09.        <UpdatedControls>
10.          <telerik:AjaxUpdatedControl ControlID="RadGrid_Addresses" LoadingPanelID="RadAjaxLoadingPanel_ManualRequest" />
11.        </UpdatedControls>
12.      </telerik:AjaxSetting>
13.    </AjaxSettings>
14.  </telerik:RadAjaxManager>

 

Using this definition (where Radgrid_Addresses is a control contained in the ItemTemplate of the Formview), the ajax request seems to work for the first request to the radgrid (for example, moving to the next page) but subsequent requests (moving back or forward a page again) seem to affect the entire formview rather than just the grid.

 

Thanks,

 

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 18 Jun 2020, 03:39 PM

Hi Michael,

The provided setup leads to nested update panels which will cancel each other during an AJAX request, breaking the controls functionality from this moment on. Keeping only the first part of the update should be enough to update both the Grid and the FormView. You can also try enabling the UpdateInitiatorPanelsOnly property of the AjaxManager:

        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager_ManualRequest" UpdateInitiatorPanelsOnly="true">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadFormView_Customers">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadFormView_Customers" LoadingPanelID="RadAjaxLoadingPanel_ManualRequest" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

Regards,
Vessy
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
answered on 18 Jun 2020, 04:06 PM
Thanks Vessy, I'll give it a shot and see if it corrects the issue I see.
0
Vessy
Telerik team
answered on 19 Jun 2020, 03:03 PM

Hi,

Sure, Michael, take your time and let me know if I can assist you any further on this matter after that.

Regards,
Vessy
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Ajax
Asked by
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
Answers by
Vessy
Telerik team
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
Share this question
or