Raddock inside a formview bug/problem?

2 posts, 0 answers
  1. blablabla
    blablabla avatar
    23 posts
    Member since:
    Jul 2011

    Posted 08 Aug 2011 Link to this post

    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'.

    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?

  2. Slav
    Slav avatar
    1359 posts

    Posted 10 Aug 2011 Link to this post


    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,
    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.

Back to Top