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

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

3 Answers 120 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Preet Virk
Top achievements
Rank 1
Preet Virk asked on 28 Mar 2013, 11:16 PM

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.

3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 03 Apr 2013, 12:05 PM
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.
0
Richard Weltz
Top achievements
Rank 1
answered on 22 Aug 2013, 02:04 PM
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?
0
Tsvetoslav
Telerik team
answered on 23 Aug 2013, 10:37 AM
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.
Tags
General Discussions
Asked by
Preet Virk
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Richard Weltz
Top achievements
Rank 1
Share this question
or