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

Radgrid inside Editform Template of Parent Grid causes Parent Grid to rebind.

5 Answers 141 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff H.
Top achievements
Rank 1
Jeff H. asked on 26 Nov 2013, 09:27 PM
I have an RadGrid with an Editform template that contains a RadAjaxPanel control with a sub-gird inside panel. I am using the RadAjaxPanel to help eliminate the page refresh when performing updates to the data inside the editform template.  I use a RadAjaxLoadingPanel with all default values so that when the sub-grid is updated the loading image shows and the whole page will not refresh.  However, I noticed that if I refresh or rebind the sub-grid it causes the parent grid to refresh as well.  So the setup looks something like this.

<telerik:RadGrid ID="MyParentGrid ... >
   {Databound Columns}
   ...
  <EditFormSettings EditFormType="Template" EditColumn-HeaderButtonType="LinkButton">
      <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
                <FormTemplate> 
                   <telerik:RadAjaxPanel ID="EditArea" runat="server" Visible='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "false", "true") %>'  BorderStyle="Solid" BorderWidth="1px" LoadingPanelID="RadAjaxLoadingPanel1"> 
                                          
                                           <telerik:RadGrid ID="MyChildGrid" ... >
                                           </telerik:RadGrid>

                   </telerik:RadAjaxPanel...>
                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
                    </telerik:RadAjaxLoadingPanel>
                </FormTemplate> 
         </EditFormSettings>
</telerik:RadGrid>

Is there something I need to do to isolate the update of the sub-grid from the parent grid?  Do I need an AjaxManager inside the EditForm Template?

Thanks in Advance,

Jeff

5 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 29 Nov 2013, 12:21 PM
Hi Jeff,

I have created a sample RadGrid web site to test the described behavior. Can you please run the attached application and instruct me the exact steps I need to take to reproduce the issue locally?

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Jeff H.
Top achievements
Rank 1
answered on 03 Dec 2013, 04:09 PM
Eyup,

After tinkering with your example it still wouldn't match what I have in my edit form,  At any rate I was able to get around this by using some flags to indicate when to refresh the main grid.

Thanks,
Jeff
0
Eyup
Telerik team
answered on 06 Dec 2013, 08:15 AM
Hi Jeff,

I am glad you have managed to resolve the issue. You can also check out the following sample:
http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/partialajaxification/defaultcs.aspx

Hope this helps.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
MV
Top achievements
Rank 1
answered on 20 Oct 2016, 08:42 PM

Hi,

I have RadGrid2 and UC1 (user control) inside RadGrid1 Edit Form Template. My user control inserts data which I display using RadGrid2. I'm trying to refresh RadGrid2 automatically after UC1 is done. And the other way, if I update/delete items from RadGrid2, I want to be able to refresh my UC1.How can I accomplish this?

(My user control is an image. When I click the image, a Radwindow appears, inserts then closes. I have 2 images, if there is data on the grid, I display a populated note, if there is nothing then I display an empty note.)

Thanks in advance.

 

0
Accepted
Viktor Tachev
Telerik team
answered on 25 Oct 2016, 02:28 PM
Hi,

Note that the RadGrid is a complex control and needs to be refreshed as a whole. Thus, updating only parts of the Grid is not available out of the box. This is why the Parent grid is refreshed after you update the inner Grid.

With that said, if you would like to show hierarchical data I would recommend using the built-in hierarchy support for RadGrid.

If I understand your scenario correctly. The UserControl would be a custom edit form for RadGrid2. If that is the case, you can use an approach similar to the following in order to have them work together:


Please refer to the following article that elaborates in more detail on how you can update values in the grid via UserControl edit form.



Regards,
Viktor Tachev
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Tags
Grid
Asked by
Jeff H.
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Jeff H.
Top achievements
Rank 1
MV
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or