1

I want to add RadEditor dynamically. It is getting added to the page but as soon as postback occurs i get Multiple controls with the same ID 'EditorRibbonBarResourcesHolder' were found. Below is the code that i am using to add control dynamically.

RadEditor editor = new RadEditor();
editor.ID = "editor_" + itemTypeattribute.ItemAttributeID + rand.Next();
cellAttributeValue.Controls.Add(editor);
editor.DialogOpener.ID = "editor_dialopOpener_" + itemTypeattribute.ItemAttributeID;
editor.DialogOpener.Window.ID = "editor_dialopOpener_window_"+ ItemTypeattribute.ItemAttributeID;
editor.ClientIDMode = ClientIDMode.AutoID;
editor.EnableEmbeddedScripts = true;
editor.Height = 200;

Any help is appreciated. Thanks

mehul9595
  • 1,925
  • 7
  • 32
  • 55

1 Answers1

0

Whenever I need to use a radeditor "dynamically" I have it on the page from the start with visible=false and then show it when I need it.

JumpingJezza
  • 5,498
  • 11
  • 67
  • 106
  • It works fine but when i click any other toolbar buttons inside Editor then it gives me error "Multiple controls with the same ID 'EditorRibbonBarResourcesHolder' were found". – mehul9595 Oct 03 '11 at 11:34
  • Do you get the error when *not* creating it dynamically and having it on the page from the start? What is the html markup you are using in this case? – JumpingJezza Oct 04 '11 at 02:10
  • scenario was that i had to create 1 or more editor dynamically based on few conditions. So didn't got any luck using RadEditor... so i have moved to using other HtmlEditor. Thanks for your help. – mehul9595 Oct 11 '11 at 06:53