Have you ever tried to open a data view web part (DVWP) in SharePoint Designer only to discover the page won’t load because it has too many records to try and display? Frustrating.
SharePoint Designer has an incredibly handy “Show with sample data” option that is intended to solve this problem. When you check this option, your DVWP will refresh and appear with 5 sample records. These sample records enable quick and easy rendering in SharePoint Designer but do not impact storage of your actual DVWP data.
But what if you don’t have “Show with sample data” turned on AND you can’t get your DVWP to load in SharePoint Designer because there are too many records? I ran into this issue several times before discovering that you can quickly and easily turn on the “Show with sample data” feature in code view. Since code view doesn’t display actual DVWP records (only the underlying code for your DVWP), it isn’t hampered by having too many list items to display.
Here are the steps to resolve this issue:
- Go into SharePoint Designer and open your DVWP.
- Click on Code view (available as a selection option at the bottom of the ASPX page view).
- Do a Ctrl+F and type in the search term sampledata.
- You will find the tag ShowWithSampleData=”False”
- Replace the word False with the word True and save your changes.
- Click on the Design view. Your DVWP will display with sample data.