Problem with huge SharePoint 2010 list

Problem with huge SharePoint 2010 list
Problem with huge SharePoint 2010 list
Problem with huge SharePoint 2010 list
Problem with huge SharePoint 2010 list

Huge SharePoint 2010 list

I’ve been working on SharePoint 2010 project for my client. The project is simple but requires a lot of manual work. As result, I get the simple custom list. For this list, I created New Form page to make some customization. When I check it in SharePoint designer list was displayed without any problem. But when I uploaded the list into SharePoint site and try to add something list I get a strange error: “Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator. ”

What’s going on?! The solution was simple but required some work to get a result. It seems that SharePoint has a problem with a large XSL transforms  in a single template. As far as I know, the limit is 50 elements. The problem has been sent to Microsoft but it looks that without any result. So what to do? I found a solution at Technet, but for me it’s messy, so please find my version.

When I switch to the code view of my New form I had to find:  <xsl:call-template name=”dvt_1.rowedit”/> element.  Then we have to select it and make a copy and CTRL+V below it. Then you need to add 2 at the need of string. As result you should get <xsl:call-template name=”dvt_1.rowedit2″/> . In my case it was enough, but if your list is bigger it could be necessary to add another element.

Go back to <xsl:call-template name=”dvt_1.rowedit”/> , select it and find matching tag. You should find somewhere at the bottom: </xsl:template> . Good. Now you have to copy below this element:

<xsl:template name="dvt_1.rowedit1">
<xsl:param name="Pos" select="position()"/>
<tr>
<td>
<table border="0" cellspacing="0" width="100%">
</table>
</td>
</tr>
</xsl:template>

And then you need just copy into <table></table> tags some of your rows from space between <xsl:call-template name=”dvt_1.rowedit”/> and </xsl:template> . I have taken half of them. In the result you get something like this

<xsl:template name="dvt_1.rowedit1">
<xsl:param name="Pos" select="position()"/>
<tr>
 <td>
 <table border="0" cellspacing="0" width="100%">
 <tr>
 <td width="190px" valign="top" class="ms-formlabel">
 <H3 class="ms-standardheader">
 <nobr>ID/Status</nobr>
 </H3>
 </td>
 <td width="400px" valign="top" class="ms-formbody">
 <SharePoint:FormField runat="server" id="ff22{$Pos}" ControlMode="New" 
FieldName="ID_x002f_Status" __designer:bind="{ddwrt:DataBind('i',concat('ff22',$Pos),
'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@ID_x002f_Status')}"/>
 <SharePoint:FieldDescription runat="server" id="ff22description{$Pos}" 
FieldName="ID_x002f_Status" ControlMode="New"/>
 </td>
 </tr>
 </table>
 </td>
</tr>
</xsl:template>

When you save changes, you will be able to add a new element without a problem. Do you like this post? You can check my other post about SharePoint development here.

2 Comments:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Let’s Talk About How I Can Help You

Get A Free Quote
Problem with huge SharePoint 2010 list
Problem with huge SharePoint 2010 list