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

[Solved] Two RadGrids and RadAjaxManager

2 Answers 151 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Pak
Top achievements
Rank 1
Pak asked on 12 May 2009, 03:54 PM
Hi I'm having some problems with having two rad grids and one radajaxmanager on the same page.

The structure of my page is:
Page contains Panel A which contains UserControl A that contains text and a usercontrol B  that contains RadGrid1
Page contains Panel B which contains a usercontrol C that contains RadGrid2
Page is a content page. The Master page contains RadAjaxManager.

So in UserControl B I add RadAjaxManagerProxy and have the Initiator and UpdatedControls both set to RadGrid1

This works. whenever we click on a button inside RadGrid1 to add row. the RadGrid1 and RadAjaxManager1SU are updated Panels. (1 is this normal to have RadAjaxManager1SU as updated panel)

However, when i set up on the Page via RadAjaxManagerProxy to have Panel B both as initiator and UpdatedControls. I click on a button inside RadGrid2. I see that UserControl C AND RadGrid1 as well as RadAjaxManager1SU are updated Panels.  (2nd issue: why is RadGrid1 being updated).

Also, when i set up Panel A to be UpdatedControl by Panel B. My Button click on RadGrid1 now Updates Panel A completely. Even after I set ChildrenAsTriggers = false.  It seems to interpret my button clicks within the grids originate from both Radgrids?! ( 3rd issue: i don't want the entire panel A to be updated just RadGrid1

Is something blaringly wrong in my set up? is there an attribute i haven't set up correctly?

EDIT: also, i use Page.ClientScript.GetPostBackEventReference( btnInput, "" ) to initiate the postback from my buttons on the form. where btnInput= GetInputControl( item ) and item is GridDataItem

2 Answers, 1 is accepted

Sort by
0
Pak
Top achievements
Rank 1
answered on 12 May 2009, 07:29 PM
I think ALL my panels are updating on every ajax postback.
0
Iana Tsolova
Telerik team
answered on 15 May 2009, 08:59 AM
Hello Pak,

Indeed, RadAjaxManager1US is the RadAjaxManager itself and it should not be updated. So if you have set it as updated control somewhere in the ajax settings, please remove it.
From your description I understand that you have settings where RadGird1 updates itself. So it is expected when you click a button in RadGid1, only RadGrid1 to be updated. Secondly, you have settings where Panel B updates itself and Panel A. In this case when you click a button is RadGrid2, RadGrid2 and all the Panel B are updated as well as Panel A and everything inside it, including RadGrid1.
Is that the desired result or I am missing something out?

Sincerely yours,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
Pak
Top achievements
Rank 1
Answers by
Pak
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or