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

[Solved] RadAjaxManager RadWindow and RadGrid

2 Answers 144 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Scott Griffin
Top achievements
Rank 1
Scott Griffin asked on 08 Apr 2009, 09:40 PM
I am working off of the basics to this demo 
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid

I have the grid in a asp:Panel
If I just leave the panel visible from page load then this works fine.
The issue I am having is I have a RadPanel that is controling multiple asp:Panels setting their visible values from true to false and of course this is all wrapped up in a radajaxmanager.

so when I click on the button to view the RadWindow I get a javascript error 
 Sys.InvalidOperationException: Two components with the same id 'UserListDialog' can't be added to the application

can someone shed some light on this subject for me? I am lost as to why the one way it works

2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 10 Apr 2009, 02:07 PM
Hello Scott,

This error may be caused by adding the same control twice on the page. For example, if your page derives from another one, it is possible that you add the control again in the derived page.

I suggest that you check this blog post on the matter:
ASP.NET Ajax exception - Two components with the same is can't be added to the application 

I hope this helps.

Sincerely yours,
Pavlina
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Patrick Carlile
Top achievements
Rank 1
answered on 10 Apr 2009, 03:11 PM
I have had the same issue as you.  It occured when I had multiple grids synched up with a RadAjaxManager.  On the Edit Template that would pop up, I had a Custom Validator that would dynamically create a RequiredFieldExtender.  This extender would cause a javascript exception (as you described) when Edit was clicked.

The easiest way to solve the problem was to remove the RadAjaxManager.  Instead, manually wrap each control in thier own update panel and, on the appropriate events (such as OnItemCommand and OnSelectedIndexChanged), call update on them.  Essencially, I believe that's all RadAjaxManager is doing under the covers anyway.
Tags
Ajax
Asked by
Scott Griffin
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Patrick Carlile
Top achievements
Rank 1
Share this question
or