Hack: Data View Web Parts in SharePoint 2013

If you noticed that the design view doesn’t exist anymore in SharePoint Designer 2013, here is a hack that I figured out, which lets you create data view web parts for your SharePoint 2013 site.

Note that this is most likely NOT supported by Microsoft.  This is just one way that I figured out, so if you really need to create data view web parts, and you’re not a developer, you may want to try this as a very funky workaround.

  1. Create an empty document library in your SharePoint 2013 site, which will be the temporary holding place for web part creation.  I just called mine “Web Part Pages”.
  2. Open your SharePoint 2013 site in SharePoint Designer 2010.
  3. Click the little pin icon next to All Files on the left.  That will put a tree view of the site on the left.
  4. Right click on your new library, and choose New –> ASPX.
    Ch14[2]
  5. Give your file a name, like test.aspx. Double click the file to open it, and click Edit File.
  6. Yes, open the page in advanced mode.
    Ch14[3]
  7. On the Insert tab, choose Web part zone.  Then, on the Insert tab, choose the Data View drop-down and choose Empty data view.
  8. Click on Click here to select a data source (in the middle of the page), and choose your list, library or whatever.  I’ll choose Tasks.  Click OK.
  9. On the right, in the data source details pane, select the fields you need, and click Insert Fields as, and choose Multiple Item View.
    Ch14[4]
  10. There, now you can do whatever you need to do with your data view web part, etc, and get it how you want it.  This is the page that you will go back to in order to make any needed changes.
  11. On the Web Part tab in the ribbon, click To File.  Save this .webpart file to your computer, and just remember where.
  12. Open your site in the browser, and go to the page on which you would like to place your web part.  With the page in edit mode, click the Page tab, and the Insert tab.  Click Web Part.
  13. On the left side, under the web part categories, click the Browse… button under Upload a web part.  Browse to that .webpart file you saved at step 11.  Click Upload.
  14. Now you’ll have to click to insert a web part again, and this time you’ll see it in the Imported Web Parts category.  Click Add to add the web part to your page.
    Ch14[6]

Now that this is done, again, any changes you make will have to be in that temporary aspx page that you created.  IT’S ALL ABOUT THE MASTER PAGE.  The key is that I did not attach a master page to my blank aspx page.  I tried to find a way to edit existing views, by attaching the v4.master page and trying to make changes before re-attaching the v15.master.  That did not work out.  Anyway, let me know what you guys think.  I know it takes a few extra clicks, but at least DVWPs are doable.

Also, check out my Data View Web Part Videos for more info and cool stuff you can do with the DVWP.

UPDATE 5/3:

Thanks for all of your comments below.  You’re right, apparently they locked it down:

C10f015

49 comments

  • Why would you call this a hack?
    You’ve been telling everyone to do it this way for years. I don’t really understand. Can you shed some light on that?

    Cheers,
    Matthew

  • Hey Matthew,
    Yeah, since there’s no design view in SharePoint Designer 2013, it would appear as though you can’t do data view web parts anymore. So the trick here is that I’m opening a SharePoint 2013 site in SharePoint Designer 2010, so that’s why it’s a hack.

  • Inserting a Data View Web Part on a new .aspx page in SharePoint Designer 2010 worked for me. I’ve also once inserted one on a regular page in SPD 2013. Setting the data source, however, only worked for me in SPD 2010 on the blank page. I wasn’t able to set the data source for the web part I added in SPD 2013.
    Thanks,
    Tom

  • I’m curious what urls you were using when you did this. I’m still trying to understand the new App Models. When you added the web part to your site, were you in the sharepoint server content database or the new App Web? If you were in sharepoint, it would be a simple URL. If you were in the App Web it would be some wierd GUIDed URL. Also what did you create your site collection as. And the template.

    If you were in the sharepoint server, this really defeats the purpose of what Microsoft was trying to do. Limit exposure to sharepoint by custom anything.

    Just curious.

  • I wouldn’t call this is a hack. At the end of the day the DVWP doesn’t care where and how you configured it. You could use Notepad if you prefer, so using SPD 2010 is just a convenience.
    Check out http://rainerat.spirit.de/2012/07/15/sharepoint-dvwp-from-workhorse-to-ferrari-in-7-steps/ for the bare minimum you need to get the DVWP up and running. And yes this still works in SP2013.

  • Thanks, huge time saver over using a Notepad or SPD2013.

    What does SPD 2013 do now?

  • Rainer,
    Yes, it works like it’s always worked, but how are people going to know that it needs to be done in spd2010 with no master page? That’s why I wrote this.

    Mike,
    Workflows.

  • Thanks for giving me some hope for SPD2013 without design view. I’m really gonna miss it.

  • I foresee a lot of webcasts and Sharepoint Saturday sessions on how to survive without design view in SPD.

  • thanks so much. DVWP are my go-to feature – this at least gives me a life jacket.

  • Come on …Move out of Sharepoint Designer atleast after the release of Sharepoint 2013.Ther is definelty some reason why this was not supported ann better to noy use it

  • I should have known you’d already figured this out! Thanx Laura… You’re the bomb as usual.

    Praveen – some of us don’t want to live in Visual Studio so Laura’s work is VERY helpful.

  • For me, the biggest loss from Design View is not having the conditional formatting support in SPD 2013. I create a lot of custom lists that help me track various aspects of projects. Having conditional formatting helped to relay information about the state of certain rows/columns/cells, which proved to be very useful.

    So, I’d love for someone to explain how I can get conditional formatting working on my SharePoint 2013 sites. I’d prefer a solution that has visual interfaces like SPD 2010 did, but I don’t mind getting my hands dirty.

    Thanks!

  • Peter,
    Well, you can either do it the way that I’ve outlined here in this blog post, or you can try this new software by Lightning Tools called the Data Viewer Web Part:
    http://lightningtools.com/products/data-viewer-web-part/

  • Hi Laura
    thanks a lot, was running into this problem and cojuld solve it with this approach, magic work!

  • Hi Laura,

    I’ve been looking at that Lightnight tools Data viewer Web Part for 2013 too. That woud be very valuable. One thing that concerns me with buying it is that those types of 3rd party apps are going to keep sites from moving to SharePoint Online. Been playing with SPO and it’s just brilliantly clean and responsvie, but the idea that we can’t easily connect int on-Prem datasources nullifies anything worth having in the Cloud. MS introduces some black box on-Prem solution that lets us wireup SPO connections and secure stores to on-Prem Data Sources in a few configurable steps. What you have to do now is somewhat nuts.. develop a MCF Service layer with contracts for every operation and host it on your own outward facing Web servers? Or build Hybrid App Hosted solutions and maintain an on-prem and cloud instance? I’m a .Net Developer and I can tell you I understand why SPD is still here.

  • Laura – When I try this I get the following error on my test.aspx page: Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type Microsoft.SharePoint.WebPartPages.DataViewWebPart, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c could not be found or it is not registered as safe.

    How can I fix this?

  • Cannot open SP2013 Foundation site in SP Designer 2010. the SP 2013 full Server may still be working though.

  • Have the same problem now. Some weeks ago it had worked. Dammed, seems that MS has maked some changes in updates to prevent the access to SPF2013 server from SPD2010.

  • I too have been using this “hack” for some time and came back one day to find it not working.

    There are two options based on my testing: uninstall SPD2010 and reinstall. This will fix it, but the next time updates are applied it will break again.

    Option two, roll back or block KB2553382 from being applied. This is the update that effectively stops SPD2010 from connecting to a 2013 site.

    http://support.microsoft.com/kb/2553382

    I removed and reinstalled SPD2010 then applied each update one by one testing SPD to see which broke it. Once KB2553382 was applied I could no longer connect, once I rolled it back, I was able to connect again to 2013 from SPD2010. You can find this updated grouped under SharePoint Designer 2010 in Add Remove Programs/Updates.

    I have hidden this update in Windows Update to prevent this from happening again.

    **Disclaimer** Please check with your IT group before rolling back or blocking any updates. They may also need to block this at the server level if using WSUS to push updates.

    Hope that helps!!

    Dave

  • Good Hack Laura, This was really surprise from Microsoft that there is no Design view in SharePoint Designer 2013. But you have cracked it with the help of SharePoint Designer 2010.
    But this thing need extra efforts as we need to create a new ASPX page with no master page then do the things for design, save to file, upload and add to page. These are the extra efforts. Nevertheless, good work.

  • Do you have any new workarounds for this since it has been locked down?

  • Julian Knight

    It WAS a good hack but now Microsoft have turned off the ability to use Designer 2010 with SharePoint Online.

    If your on-premise site still works, great, but it is only a matter of time before it catches up with SP Online.

    Extremely annoying and one that I’ve raised with our Microsoft technical and account reps.

  • Well, even in SPD 2013, you can still go into code view and insert data view web parts and do a lot of the same functionality. The trick is that you have to know where to put your cursor in the code in order to do that.

  • I also attempted to try this and found out it was turned off. Has anyone found a tool that will allow you to do this. Does MS plan on putting this capability back into SPD 2013. I really hope so. We may put the whole converision to 2013 off since we have found this issue.

  • I just want to thank DAVE KUEHLING for the tip about uninstalling the SPD update. I asked several people at MSFT about this and they had no clue. So nice of MSFT to pass this off as an “update” so no one would know about it.

  • Steve,
    No, Microsoft has stated that they are not planning on giving us back the design view. 🙁 You can install a product called the “Data Viewer Web Part” by Lightning Tools. It’s the only tool like that, that I know of.

  • Hi Laura,
    Thanks for those useful information. However, when I followed the steps above and tried to import to my SharePoint 2013 portal. All the conditional formatting are lost and the + sign for “Group By” are not functioning… Did I miss something very important? Please help and advise.

    Thank you very much.
    Sam

  • You are my hero! This works, and it is just awesome.

    Thanks also to Dave K. for discovering which “fix” causes the incompatibility.

    [I am soooooo mad at Microsoft for removing Design View!]

  • Laura, You hack still works if you uninstall SPD Update (KB2553382 ) or not install it…

  • Thanks so much Laura for this workaround. Was glad that I could use SPD 2010 with SP 2013 but realized soon that web parts did not work very well. This will really help me.

  • I call this a hack because the feature that we used to use, which was MUCH easier – doesn’t work. So we have to ‘hack’ it to make it easier. If it was obvious how to replace the old feature – then that wouldn’t need a hack.

  • MSFT snuck the update that blocks access to SPD 2010 through again – this time disguised as an Office 2010 update. The KB is 2687455 so now you have to remove that too.
    They don’t provide details on what else the update does so remove at your own risk. But Office worked okay before it got updated and it doesn’t seem to affect anything so I suspect it just blocks access to SPD 2010.

  • CuriousSharepoint

    If designer is not available then how we can update the Parameter value through code.
    What is the Tag Name.

  • Great job! Thanks a lot Laura. It would really help out many SharePoint 2013 developers.

    Thanks a ton!

  • Awesome hack, I wish that MS didn’t block it though 🙁

  • HI,
    I keep getting: “An error occurred while attempting to add the item to the page”.
    How can I fix that?

  • i am creating linked data source of two list,but first list column data displaying and second list column data is blank(second list column are lookup column),how can i solve it.
    Waiting for reply.
    Thanks.

  • Thanks for the tip. Works well for me with SP server SP1. The only issue I have is the dataview does not populate when using the web part on a different site within the collection.

    The line of code below and the parameter referencing the URL is the relative path of the list. Adding the full URL will allow you to use the web part across sites in the same collection.

    For a Sharepoint n00b like me this tip was very useful. Thanks!

  • Today I tried these steps and it worked fine. I was able to get SPD 2010 to work with the 2013 site but only after uninstalling it, installing SPD 2013, and then reinstalling SPD 2010 again.

  • Emrullah Kızıltepe

    Hello,
    I have been trying to access SP 2013 via SPD 2010, too. But, I could find none of KB2553382, 2687455 and 2810069 in my server which there are rumors as they prevent SPD 2010 from accessing to SP 2013 about. Did Microsoft publish another update package doing the same thing?

    Thank you,
    EK.

  • The trick is that you have to uninstall and re-install SharePoint Designer 2010. My computer keeps auto-updating without giving me a choice, and then I just uninstall and re-install each time I have to use SPD 2010 on a 2013 site.

  • It appears if you uninstall SPD2010 and then re-install, it will still work, but you’ll probably notice that Office 2010 wants to download and install as an update (KB2687455 Office 2010 SP2). I’m guessing this is what will now break it. Since my other office apps have a version of 14.0.7140.5002, it appears they are still “upgraded” past the SP2 version number, so it’s only SPD that doesn’t have SP2.

  • Hi Laura,

    Looks like I read your article too late since SP2010 is blocked from accessing SP2013. I have been customizing my views for years without limitations in SP2007 with SP2007 designer. Any advice on how to get around designer in SP2013 (since my company has blocked off SP designer and visual studio access for SP2013 now)? I feel like I’m working with one hand tied around my back on this one.

    Thanks,

    Phil

  • This is possible without needing SharePoint Designer 2010… it is not the most pleasant way of working but does the trick to get DVWP’s in SP 2013 and I’ve created many this way.

    1. Insert and Empty data view in the page
    2. click outside the dataview wrapper and then add a standard list view for the list you want in the dvwp, this should then bring up the datasource details on the right hand side.
    3. Click back into the Empty data view, and select the fields you need from the data source, clicking insert as multiview and it will create the connections that you need
    4. Delete the listview you created.

    Thanks

    Mark

  • So much appreciated thanks for this information. You’re beautiful to be called a hacker.

  • SharePoint Designer 2010 does not allow me to open a SharePoint 2013 site.

    Regarding this ‘hack’, what do I do now?

  • You still have to uninstall SharePoint Designer 2010 and reinstall it. Every time your computer updates, it will lock it down again and you have to keep uninstalling and reinstalling.

Leave a Reply