Problem with huge SharePoint 2010 list

by | Feb 25, 2013 | SharePoint | 2 comments

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.

Written by Tomasz Szulczewski

Hi, my name is Tomasz Szulczewski, and I have been in love with information technology for over 25 years, but I still have an IT passion and feel like a geek. I am a person who is problem solver who thinks that not all people must be experts in IT.

Related Posts

What is SharePoint in Office 365?

What is SharePoint in Office 365?

What is SharePoint in Office 365, and why is SharePoint for small business the critical product? So you bought a Microsoft 365 license, and your tenant is online. You open a browser, and you have no idea what to do next? Don't worry; I will try to give you a few...

read more
Hubfly

Hubfly

A few days ago I have a chance to play with SharePoint online solution called Hubfly and I was really impressed with his capabilities. And here is my review. So let’s start from the begging. I wrote a few times on this blog that the main problem with SharePoint is...

read more

2 Comments

  1. ale myślę że

    Great post. I will be dealing with some of these issues as well.
    .

    Reply

Leave a Reply

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