Tuesday, July 1, 2014

SharePoint 2013 – Add DataView WebPart with SharePoint Designer 2013

Summary : SharePoint 2013 – Add DataView WebPart with SharePoint Designer 2013, Create a new DataView WebPart with SharePoint 2013, How to add a new DataView WebPart with SharePoint Designer 2013
As in previous versions of SharePoint In SharePoint 2013, you can still add Dataview webparts to your pages using SharePoint designer 2013 but with a an exception that you no longer see a Design View in SharePoint Designer 2013.
Adding DataView with Source is still not very clear. I saw a bug when I tried to add a Dataview but it would only show empty data view and not the List\Library list. However, I found a workaround that and was finally able to add a XSLTListView WebPart on a page.
In this post we will see the Step-by-Step Tutorial on how to add a DataView in a SharePoint 2013 site page which will be viewed in Browser.
1. Open your site in SharePoint designer 2013.
2. Next, Create a WebPart Page.

Give your Webpart Page a name and click ok.
3. Next Edit file to Open.

4. Click on “CODE VIEW TOOLS” tab and then click on Parse HTML

5. Next click in of WebPartZone and then click on Insert Tab and then DataView.

If you don’t see this and just sees the “Empty Data View” Option select that and then again click in the WebPartZone and then Data View again. Then you will see the datassource Options. The earlier (empty data view) will add a DataFormWebPart that you can delete that if you want.

This might be a Bug in SharePoint 2013 beta Designer.

Once you add a DataView for a List\Library you will see a new XsltListViewWebPart added.

6. Click on XsltListViewWebPart and you will see the DataView’s tab appear.

Here you can Add\Columns,Set Paging,View Data Source details and rules and can do pretty much everything you use to do with your OLD dataview.
If you want to edit the XSLT of this webpart you can navigate to “DESIGN” tab and click on “Customize Entire View”.

7. Preview Changes – Even though the Design View is missing you can still preview the changes with “Preview in Browser”.

8. Once done Save the Page and Check in.

No comments:

Post a Comment