Friday, September 21, 2012

Dataview webpart in SharePoint 2010

A Data View Web part is a great way to display data with filtering, grouping, and user desired formatting. It was the most useful webpart in SharePoint 2007 and now has been improved to a great extend in SharePoint 2010. In SharePoint 2010 you now have a XSLT Listview webpart and a Dataview webpart (Old one).

XSLT Listview webpart – XSLT Listview webpart is a ListView whose XSLT can be modified in SharePoint designer. With this you now have some advanced formatting options and can also use all the filters,sorting grouping etc features that a Dataview wbepart had in SharePoint 2007. 

DataView Webpart – Even after all the great features that XSLT Listview webpart has offered, i would still prefer to work with the old Dataview webpart’s XSLT if i have to. The OLD dataview webpart is still available and can be used in the same manner as we used in SharePoint 2007. To add a Dataview webpart onto a page follow the steps below.

1. Open your SharePoint Page and in Site Actions select ->Edit in SharePoint Designer. 

2. Now select a zone on teh Page where you want to add your Dataview weboart.

3. Next, click on Insert tab -> click on Data View.

4. In the drop-down of Data view menu click on “Empty Data view” . This will now insert an Empty Data view in your selected zone.

5. Next click on “click here to select datasource” to select the datasource or list. 

6. Select the list\library you want to display the data from. 

7. Next drag and drop the columns in the dataview webpart from the right hand column list (for the list\library you selected). You now have the Dataview webpart on your page. You can now use the formatting options available on your ribbon or can modify the XSLT either in SharePoint Designer or on the page itself by editing the webpart properties in the Browser.

No comments:

Post a Comment