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

Raddock inside a formview bug/problem?

1 Answer 45 Views
Dock
This is a migrated thread and some comments may be shown as answers.
blablabla
Top achievements
Rank 1
blablabla asked on 08 Aug 2011, 02:59 PM
Hi,
I'm having a small problem with RadDock controls defined inside a formview, and I am not sure if it's my fault or if it's a bug.

In general, the controls inside a FormView's ItemTemplate and EditItemTemplate can have the same ID without any issues. In my case, I have a RadDock inside a formview with the controls defined inside the <ContentTemplate> of the RadDock. This leads to an error when I access the page that says: The type 'ASP.pages_mypage_aspx' already contains a definition for 'control'.

So:
Formview => ItemTemplate => RadDock => ContentTemplate => Control with ID X
Formview => EditItemTemplate => RadDock => ContentTemplate => Control with ID X

Is there a workaround for this that doesn't involve renaming the controls within the RadDocks?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 10 Aug 2011, 04:36 PM
Hello,

By initial design the RadDock's ContentTemplate was set with [TemplateInstance(TemplateInstance.Single)] attribute, so that the controls inserted in the content of a RadDock can be accessed in the code-behind. This is causing problems when a RadDock, containing server controls with identical IDs, is added both in the ItemTemplate and the EditItemTemplate of a FormView.

Currently the only approach I can suggest to you would be to populate the RadDocks with controls that have unique IDs.

All the best,
Slav
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Dock
Asked by
blablabla
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or