Telerik Rad Controls Webpart and SharePoint 2013 Design Manager masterpage not working together

4 posts, 0 answers
  1. Preet Virk
    Preet Virk avatar
    5 posts
    Member since:
    Jun 2010

    Posted 28 Mar 2013 Link to this post

    Telerik Experts,

    We have created some
    SharePoint Visual Web Parts containing Telerik Rad Control ( RadGrid for ASP .Net Ajax) using Visual Studio 2013. These are simple webparts that consume sharepoint lists as datasource. We sucessfully deployed the Web Parts to SharePoint 2013 and are able to add these WebParts in SharePoint pages.

    The solution works fine as long as we are using default SharePoint MasterPage. There is a feature in SharePoint which lets you create
    custommasterpages for the site from an html file. The details as how it works can be found here:
    http://preachingsharepoint.blogspot.com/2012/09/sharepoint-2013-how-to-add-html-master.html

    When we use these converted masterpages for the site pages, webparts developed using Telerik Controls for ASP .Net AJAX no longer works and pages start erroring out. Here's the error message the we get
    "The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases. "

    We tried creating a webpart with standard ASP .Net controls and use them with these custom masterpages. These WebParts works fine, so the problem is isolated to using WebParts containing Telerik controls and using the custom masterpages that are converted from html. We were able to reproduce this issue on multiple SharePoint farms, so its not an one off issue.


    Appreciate your help in advance

    Regards
    Preet Virk

  2. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 03 Apr 2013 Link to this post

    Hi Preet,

    Please, leave the discussion to the formal support ticket. Thanks for that.


    Greetings,
    Tsvetoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Richard Weltz
    Richard Weltz avatar
    1 posts
    Member since:
    Jan 2010

    Posted 22 Aug 2013 Link to this post

    Hi,

    I am having this exact same problem. With a custom master page which was originally created using the design manager in SharePoint 2013 I get the following error when my web part contains a RadGrid.

    The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.


    The error does not occur when the default seattle or oslo master pages are used.

    Is is possible to share the solution here or should I open a support ticket?
  4. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 23 Aug 2013 Link to this post

    Hi Richard,

    Yes, please find below the solution:

    In order to fix it, move the SPWebPartManager control in the masterpage from the HEAD section into the BODY section of the html masterpage.  

    This is what you need to move into the BODY:

            <!--MS:<SharePoint:AjaxDelta id="DeltaSPWebPartManager" runat="server">-->
                <!--MS:<WebPartPages:SPWebPartManager runat="server">-->
                <!--ME:</WebPartPages:SPWebPartManager>-->
            <!--ME:</SharePoint:AjaxDelta>-->


    Hope it helps.

    Regards,
    Tsvetoslav
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top