SharePoint Config

Ari Bakker's thoughts on customising and configuring SharePoint

Archive for the ‘Data View’ Category

Displaying files from a specific folder using SPDataSource

without comments

This is a short post to show how you can use the SPDataSource to display items from a specific folder in a SharePoint document library. While the other parameters are fairly well documented on MSDN this isn’t very clear. Generally I don’t recommend the use of folders to separate data, I prefer a metadata based approach. In some cases, however, it makes sense such as when you need to manage permissions or approval for a group of documents (especially in SharePoint 2007 where you don’t have document sets). Looking at the parameters we can use (as shown below) to identify and locate the data it would appear that passing the name of the folder to the RootFolder property would achieve this. Continue reading Displaying files from a specific folder using SPDataSource »

Written by Ari Bakker

November 21st, 2010 at 4:17 pm

Creating custom parameters for a SPDataSource

with 3 comments

The SPDataSource is a great control for retrieving data in SharePoint. You can query a single list, multiple lists/libraries or webs and bind the data to any ASP.NET data bound control such as a Repeater, ListView, GridView or DropDownList as well as the DataFormWebPart if you want to control the output using XSLT.

You can also pass in parameters for your query such as the ListName or WebUrl using the parameter classes provided by ASP.NET such as the QueryStringParameter and ControlParameter class. As these are all generic ASP.NET controls, however, there is no way of using SharePoint specific information such as properties of the current page, or information from User Profiles. For example it isn’t possible to use this on a SharePoint publishing page and use a metadata… Continue reading Creating custom parameters for a SPDataSource »

Written by Ari Bakker

August 12th, 2010 at 8:55 pm

Data View Web Part Introduction

with 12 comments

This post shows how you can use the DataView web part (aka the DataFormWebPart) to display a list of items from another SharePoint 2007 site using SharePoint designer. Continue reading Data View Web Part Introduction »

Written by Ari Bakker

April 16th, 2007 at 10:37 pm

Date Formats in SharePoint

with one comment

To ensure that dates are formatted correctly across your WSS or MOSS site there are a couple of settings you may need to change.

First of all the regional settings should reflect the current locale. This can be changed from Site Actions > Site Settings > Regional Settings and ensuring the locale is correct. This should ensure all controls that display dates are formatted correctly.

If you are using XSLT to display dates (such as in a data view web part) you may need to update these also. One way of doing this is to take advantage of the format-date extension function provided by MSXML. This is included in the XSL for the dataview by default, but you can use this and other MSXML extension functions by including a reference to the Microsoft XPath extension functions (urn:schemas-microsoft-com:xslt) at the top of your XSL stylesheet. Continue reading Date Formats in SharePoint »

Written by Ari Bakker

April 2nd, 2007 at 3:27 am