总结:SharePoint Designer 2010 DVWP (1) -- 概述 -- XsltListViewWebPart和DataFormWebPart

 

 

1. XsltListViewWebPart

SharePoint Designer 2010里,如果直接从”Data View”里拖个ListWebPartZone里,那么默认的就是一个XsltListViewWebPart  类型的 WebPart

优点:

里边的样式和脚本都封装好了,不用做太多额外的更改;

缺点:

不可以自定义修改

2. DataFormWebPart  

有两种方法可以添加DataFormWebPart 类型的WebPart,

方法一:数据源=当前SiteListDocument Libraries,可以在”Data View”里先拖一个”Empty Data View”,然后选择一个数据源,最后从右边的”Data Source Details”拖一些Column进来;

方法二:数据源= 其他Site (包括Parent Site Sub Site )的List Document Libraries ,可以通过SOAP Service Connection 建立数据连接,然后在”Data View” 里就会发现多了一项”SOAP Service” ,我们新建的数据源就在里边,把它拖到Webpart Zone 里默认就是DataFormWebPart   类型。

 

优点:

                定制能力比较强;

缺点:

                脚本要自己写,比如Add New Item的时候,弹出窗口的脚本;

这里要想实现”Show link to item””Show lint to edit menu”比较困难,可以参照下面的方法:

To the best of my knowledge you can't add  the EditControlBlock (ECB) menu  to a DataView (DataForm) web  part. You can however turn on edit  links in the DataForm web part  properties (last tab in the properties panel) using SharePoint Designer. This will add an Edit link to the left end of each row in the web part. Clicking it will shift the row into edit mode. You will then see a Save/Cancel link where the edit link used to be. You can also turn on Insert and Delete links in the same properties panel.

Come From: http://www.go4sharepoint.com/Forum/data-view-web-part-edit-menu-10227.aspx

3. Help links:

1.     http://www.sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?List=676af157%2D7d96%2D4e15%2Da987%2D54b8a3e4d948&ID=57

2.     http://msdn.microsoft.com/en-us/library/ff630941(office.14).aspx

3.     http://blog-sharepoint.blogspot.com/2009/05/data-view-conditional-formatting-using.html

 

你可能感兴趣的:(SharePoint)