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

GridView Ajax Control in EditItemTemplate of RadGrid

3 Answers 26 Views
Grid
This is a migrated thread and some comments may be shown as answers.
moegal
Top achievements
Rank 1
moegal asked on 19 Apr 2014, 12:41 AM
GridView Ajax Control in EditItemTemplate of RadGrid

1. I have a RadGrid that would like to be ajaxed.
2. Inside a GridTemplateColumn / EditItemTemplate I have a <asp:GridView.
3. inside the GridView I have a button named "ButtonAdd".

When I click "ButtonAdd" I want to GridView to load via ajax and it should have a loading panel. But I do not want a loading panel on the entire RadGrid.
When I click the Update/Insert/Delete/Cancel buttons or do any normal RadGrid stuff I want the entire RadGrid to show a loading panel like it does now.

This code allows the GridView to work correctly but the RadGrid is not longer ajaxed.
<telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Gridview1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Gridview1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>         
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

This code always shows the loading panel over the entire RadGrid, but that is not what I need.
<telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Gridview1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Gridview1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>         
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

Can this be done?

Thanks, Marty

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 21 Apr 2014, 07:55 AM
Hi Marty,

In case you need to have the whole RadGrid control perform Ajax and not only the GridView the whole Grid should be ajaxified which will cause the RadGrid also perform Ajax. After adding the whole RadGrid control to update itself when and inner control initiate an Ajax request the response will include the whole RadGrid contain in the response base on the updated control which is the whole RadGrid. Thus behavior could not be avoid with the current RadAjax implementation.

Thanks,
Princy.
0
moegal
Top achievements
Rank 1
answered on 21 Apr 2014, 02:53 PM
Princy, 

Thanks, so is there any way to just ajaxifiy a single control without disabling ajax for the entire grid?

Marty
0
Princy
Top achievements
Rank 1
answered on 22 Apr 2014, 04:52 AM
Hi moegal,

As far as I know it is not possible to ajaxify the inner control of RadGrid without ajaxifying the RadGrid. The RadGrid will automatically ajaxify if we are ajaxifying the inner control. Please have a look into this forum thread for more information.

Thanks,
Princy.
Tags
Grid
Asked by
moegal
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
moegal
Top achievements
Rank 1
Share this question
or