Posts Tagged ‘ List ’

Walkthrough of enabling CRUD for SharePoint 2010 external lists using Visual Studio 2010

In our last blog of this series Walkthrough of creating a SharePoint 2010 external list using Visual Studio 2010 Beta, we introduced how to create a simple “Hello world” external list in SharePoint 2010 Beta using Business Data Connectivity Designer in Visual Studio 2010 Beta.

In this blog, we will show you how to pull data from an external database into an external list and enable Create, Read, Update and Delete (CRUD) functions to the external list.

First of all, you need to have SharePoint 2010 Public Beta and Visual Studio 2010 installed on your machine in order to complete this walkthrough. We’ll use “Northwind” database as external data source, so if you do not have an existing “Northwind” database available, we’ll walk you through to create a local database using SQL Server Express first (SQL Server Express comes with Visual Studio installation by default, in case you don’t yet have it, download it here).

At the end of this post, we will complete with a BDC model project which has a “Customer” entity connects to “Customer” table in “Northwind” database, and have CRUD operations enabled. The finished project can also be downloaded from here.

Prepare the data source

If you already have a “Northwind” database, you can skip this section. Otherwise, please download SharePoint2010_BDCSamples.zip from here and extract the SQL script file CreateSampleNorthwindDB.sql.

Open Visual Studio. Go to View->Server Explorer. Right click Data Connections in Server Explorer, and select Create New SQL Server Database.

1. In the prompt dialog, type “localhost\sqlexpress” in Server Name text box, and give the new database name “SampleNorthwind”.

* If you’re using the SQL Express that comes with SharePoint Server, please replace “localhost\sqlexpress" with "localhost\sharepoint”.

2. Start a Command Prompt. Go to Start->Run, type “Cmd” in the text box and click OK.

3. In the Command Prompt, type in following command and press enter:

sqlcmd -S localhost\sqlexpress -d samplenorthwind -i <Path of CreateSampleNorthwindDB.sql file>

Create BDC Project

Create a new C# BDC Model project and rename it “BdcSampleCSharp”. VB code snippets will also be provided, so you can create VB BDC Model project if you want. In this walkthrough, we will use C# project as an example. (Check this blog for how to create a BDC project)

Connect to external data source

To use the SampleNorthWind database, we add a LINQ to SQL model to the project:

1. On the Project menu, click Add New Item, in the prompt Add New Item dialog select Data in the Installed Templates pane, in the Templates pane select LINQ to SQL Classes, in the Name box, type “Customer”, and then click Add.

2. In the Server Explorer, go to Data Connections->[hostname]\sqlexpress.SampleNorthWind.dbo->Tables->Customers, drag the Customers table and drop it on the Customer.dbml design surface.

3. Add a new class file and rename it “CustomerDataContext.cs”. Replace the code of the class with the following code snippet.

Note: We made the connection string a constant in the code only for demo purpose, if you’re using your own database, modify the connection string as needed. In our future post we will introduce how to set the connection string in a custom property on LobSystemInstance inside the BDC model and read the value through IContextProperty interface at runtime.

C#:

public partial class CustomerDataContext
{
    private const string ConnectionString = @"Data Source=localhost\SQLEXPRESS;Initial Catalog=SampleNorthwind;Integrated Security=True;Pooling=False";

    public CustomerDataContext() :
        base(ConnectionString, mappingSource)
    {
        OnCreated();
    }
}

VB:

Partial Public Class CustomerDataContext
    Private Const ConnectionString As String = "Data Source=localhost\SQLEXPRESS;Initial Catalog=SampleNorthwind;Integrated Security=True;Pooling=False"
    Public Sub New()
        MyBase.New(ConnectionString, mappingSource)
        OnCreated()
    End Sub
End Class

Design BDC Model

1. On the design surface, delete entity Entity1 which is created by default. On the View menu, click on Toolbox if it is not shown. Create a new entity by drag and drop the Entity icon from Toolbox onto design surface (see the screenshot below). In the Properties Browser, change the value of Entity’s Name property to “Customer”.

Create a Specific Finder method for the entity. To do so, on the design surface, select entity Customer, you could find a <Add a Method> command in the Method Details Window. If the Method Details Window is not opened, you can find it in menu View->Other Windows->BDC Method Details. From the <Add a Method> drop-down list, select Create Specific Finder Method:

TypeDescriptors for the return parameter Customer. The edit need to be done in BDC Explorer. You can find it by going to View->Other Windows->BDC Explorer.

a) In the Method Details Window, click <Edit> command in the drop down control from TypeDescriptor Customer as depicted below. After the click the BDC Explorer will get focused on the TypeDescriptor Customer.

LINQ to SQL model. In this example, all the TypeDesriptors have a type of System.String which is the default one so we do not need to change them. After this step, we get the following TypeDescriptors in BDC Explorer:

this blog to see how to create an external list). After the list is created, you will see the following page appears when you click on the list name:

Walkthrough of creating a SharePoint 2010 external list using Visual Studio 2010 Beta, we introduced how to create a simple “Hello world” external list in SharePoint 2010 Beta using Business Data Connectivity Designer in Visual Studio 2010 Beta.

In this blog, we will show you how to pull data from an external database into an external list and enable Create, Read, Update and Delete (CRUD) functions to the external list.

First of all, you need to have SharePoint 2010 Public Beta and Visual Studio 2010 installed on your machine in order to complete this walkthrough. We’ll use “Northwind” database as external data source, so if you do not have an existing “Northwind” database available, we’ll walk you through to create a local database using SQL Server Express first (SQL Server Express comes with Visual Studio installation by default, in case you don’t yet have it, download it here).

At the end of this post, we will complete with a BDC model project which has a “Customer” entity connects to “Customer” table in “Northwind” database, and have CRUD operations enabled. The finished project can also be downloaded from here.

Prepare the data source

If you already have a “Northwind” database, you can skip this section. Otherwise, please download SharePoint2010_BDCSamples.zip from here and extract the SQL script file CreateSampleNorthwindDB.sql.

Open Visual Studio. Go to View->Server Explorer. Right click Data Connections in Server Explorer, and select Create New SQL Server Database.

1. In the prompt dialog, type “localhost\sqlexpress” in Server Name text box, and give the new database name “SampleNorthwind”.

* If you’re using the SQL Express that comes with SharePoint Server, please replace “localhost\sqlexpress" with "localhost\sharepoint”.

2. Start a Command Prompt. Go to Start->Run, type “Cmd” in the text box and click OK.

3. In the Command Prompt, type in following command and press enter:

sqlcmd -S localhost\sqlexpress -d samplenorthwind -i <Path of CreateSampleNorthwindDB.sql file>

Create BDC Project

Create a new C# BDC Model project and rename it “BdcSampleCSharp”. VB code snippets will also be provided, so you can create VB BDC Model project if you want. In this walkthrough, we will use C# project as an example. (Check this blog for how to create a BDC project)

Connect to external data source

To use the SampleNorthWind database, we add a LINQ to SQL model to the project:

1. On the Project menu, click Add New Item, in the prompt Add New Item dialog select Data in the Installed Templates pane, in the Templates pane select LINQ to SQL Classes, in the Name box, type “Customer”, and then click Add.

2. In the Server Explorer, go to Data Connections->[hostname]\sqlexpress.SampleNorthWind.dbo->Tables->Customers, drag the Customers table and drop it on the Customer.dbml design surface.

3. Add a new class file and rename it “CustomerDataContext.cs”. Replace the code of the class with the following code snippet.

Note: We made the connection string a constant in the code only for demo purpose, if you’re using your own database, modify the connection string as needed. In our future post we will introduce how to set the connection string in a custom property on LobSystemInstance inside the BDC model and read the value through IContextProperty interface at runtime.

C#:

public partial class CustomerDataContext
{
    private const string ConnectionString = @"Data Source=localhost\SQLEXPRESS;Initial Catalog=SampleNorthwind;Integrated Security=True;Pooling=False";

    public CustomerDataContext() :
        base(ConnectionString, mappingSource)
    {
        OnCreated();
    }
}

VB:

Partial Public Class CustomerDataContext
    Private Const ConnectionString As String = "Data Source=localhost\SQLEXPRESS;Initial Catalog=SampleNorthwind;Integrated Security=True;Pooling=False"
    Public Sub New()
        MyBase.New(ConnectionString, mappingSource)
        OnCreated()
    End Sub
End Class

Design BDC Model

1. On the design surface, delete entity Entity1 which is created by default. On the View menu, click on Toolbox if it is not shown. Create a new entity by drag and drop the Entity icon from Toolbox onto design surface (see the screenshot below). In the Properties Browser, change the value of Entity’s Name property to “Customer”.

Create a Specific Finder method for the entity. To do so, on the design surface, select entity Customer, you could find a <Add a Method> command in the Method Details Window. If the Method Details Window is not opened, you can find it in menu View->Other Windows->BDC Method Details. From the <Add a Method> drop-down list, select Create Specific Finder Method:

TypeDescriptors for the return parameter Customer. The edit need to be done in BDC Explorer. You can find it by going to View->Other Windows->BDC Explorer.

a) In the Method Details Window, click <Edit> command in the drop down control from TypeDescriptor Customer as depicted below. After the click the BDC Explorer will get focused on the TypeDescriptor Customer.

LINQ to SQL model. In this example, all the TypeDesriptors have a type of System.String which is the default one so we do not need to change them. After this step, we get the following TypeDescriptors in BDC Explorer:

this blog to see how to create an external list). After the list is created, you will see the following page appears when you click on the list name:

  • Share/Bookmark

SharePoint 2010 List View Blog Series: Part 3 – List View Architecture

Hi all.  This is Greg Chan, Program Manager on the SharePoint team, for the third part in this List View series. In this post I’m excited to have one of the key architects of the new XSLT List View Web Part (XLV) talk more about its architecture.  Here is what he has to say:

Hi! I’m Eric Andeen, a developer on the SharePoint team. I’m going to describe in a little more detail how the XSLT List View Web Part (XLV) works, and how that affects people building and using SharePoint sites.

List View XML and minimal markup

As Greg mentioned in Part I, the XLV is the new list view technology in SharePoint 2010, replacing the List View Web Part (LVWP). Since the XLV is the replacement for the LVWP, it needs to do all the same things, as well as adding new capabilities. The best place to start this discussion is with some of the things that haven’t changed.

The markup required to specify a LVWP is pretty simple – we need to know which list the LVWP is displaying, and we need to know about the view. The list can be identified by name, URL or guid identifier, but the view is a little more complex, and is specified in XML. This is an example of the ViewXML of the default view of an announcements list:

<View Name="{F5D7FCD1-BEFE-42b5-9339-4F4F3C6A38FE}" DefaultView="TRUE" DisplayName="All Items" Url="/Lists/Announcements/AllItems.aspx">

  <Query>

    <OrderBy>

      <FieldRef Name="Modified" Ascending="FALSE"/>

    </OrderBy>

  </Query>

  <ViewFields>

    <FieldRef Name="Attachments"/>

    <FieldRef Name="LinkTitle"/>

    <FieldRef Name="Modified"/>

    <FieldRef Name="Number"/>

  </ViewFields>

  <RowLimit Paged="TRUE">30</RowLimit>

</View>

 

The primary use of the ViewXML is to generate the SPDataSource that gets the data, but it is also used in the xsl transform to turn the raw xml data returned into presentable HTML, as we will see below. The part of the ViewXML that’s most important to this discussion is the <ViewFields> tag – it tells SharePoint which fields are in the view.

Schema Independent XSL

The XLV is now the default list view technology in SharePoint, and that means it has to scale as well as the LVWP. The only way that’s possible is for the XLV to render any uncustomized, out of the box view using a single XSLT. An uncustomized XLV has no <xsl> property at all – SharePoint supplies the same shared XSLT that is used to render every other XLV. The XSLT responsible for this lives on your server at http://<myserver>/_layouts/xsl/main.xsl – go ahead and open it up and look at it, as well as the xsl:import files vwstyles.xsl and fldtypes.xsl that do most of the work.

Before we discuss how the XLV’s schema independent XSLT works, it’s worth considering how typical, schema dependent XSLT like that used in the DataFormWebPart works. In order to render a tabular view of rows and columns, any technology, XSLT included, needs to iterate through the rows, and in each row, it needs to iterate through the columns, rendering each part appropriately. The XML we’re transforming looks like this:

<Rows>

  <Row @Field1="Hello" @Field2="World!" @Field3=""      />

  <Row @Field1="Some"  @Field2="More"   @Field3="Data"  />

  <Row @Field1="Yet"   @Field2="More"   @Field3="Data"  />

</Rows>

 

The interesting portion of a typical XSLT for this XML looks like this:

<xsl:for-each select="$Rows">

  <tr>

    <td>

      <xsl:value-of select="@Field1"/>

    </td>

    <td>

      <xsl:value-of select="@Field2"/>

    </td>

    <td>

      <xsl:value-of select="@Field3"/>

    </td>

  </tr>

</xsl:for-each>

The output HTML is a 3×3 table:

Hello

World!

 

Some

More

Data

Yet

More

Data

This XSLT is schema dependent because it iterates through the list of columns by naming each one explicitly. Using this XSLT, the schema of the rendered list is fixed; it’s not possible to change the set of fields without changing the XSLT.

The schema independent XSLT that the XLV uses iterates through the rows pretty much the same way as the example above, but it iterates through the columns quite differently. When the XLV renders the list, the XML passed in to the transformation engine includes not just the data in the <Rows> collection; it also includes the ViewXML shown above, enhanced with additional schema information. There are several instances of the field iterator in the XSLT to accommodate different view styles, but they all look something like this:

<xsl:for-each select="ViewFields/FieldRef">

  <xsl:apply-templates mode="PrintField" select=".">

    <xsl:with-param name="thisNode" select="$thisNode"/>

  </xsl:apply-templates>

</xsl:for-each>

The “ViewFields" referenced in the <xsl:for-each> is the <ViewFields> tag in the enhanced ViewXML markup, and the $thisNode variable refers to the current row in the Rows collection. The XSLT also contains a set of templates for rendering the fields. A simplified version of those field templates would look like this:

<xsl:template match="FieldRef" mode="PrintField">

  <xsl:param name="thisNode" select="."/>

  <td>

    <xsl:apply-templates match="FieldRef" mode="PrintValue">

      <xsl:with-param name="thisNode" select="$thisNode"/>

    </xsl:apply-templates>

  </td>

</xsl:template>

 

<xsl:template match="FieldRef" mode="PrintValue>"

  <xsl:param name="thisNode" select="."/>

  <xsl:value-of select="$thisNode/@*[name()=current()/@Name]"/>

</xsl:template>

 

The first template outputs the <td> tag and then calls the next template to output the actual value. The second template is where things get interesting. In the schema dependent example above, the values were all named explicitly – @Field1, etc. We can’t do that in the schema independent XSLT, so instead, we use the FieldRef node in the ViewFields markup to get the appropriate attribute from the row. $thisNode is the row of data we’re looking at, and the current XSLT context (.) is the FieldRef node for the field we’re rendering. So the value of the funky xpath expression above – $thisNode/@*[name()=current()/@Name] – is the value of the attribute in the Row tag for the current field – exactly what we want. $thisNode is the row of data we’re looking it; @* is the xpath attribute axis, and [name()=current()/@Name] selects the one attribute whose name matches the @Name attribute of the current context – the FieldRef node.

The actual XSLT for the XLV has to do more than just render simple values inside unadorned <td> tags – it has to render field headers, list item menus on title fields, proper CSS classes on <td> and other tags, etc. It also has to render some field types (hyperlink, person, etc.) differently from simple text fields. All this is done through the same basic mechanism as in the simplified version above – the fields iterator calls a template to render the field, which in turn calls into a series of other templates. Some of the simpler differences make use of <xsl:apply-templates> to select the right template – the template that renders date fields has a match="FieldRef[@Type='DateTime']" instead of just match="FieldRef", for example. More complex checks make use of <xsl:if> and <xsl:choose> along with <xsl:call-template> to call the right template.

XLV Model

The following diagram sums up the process which turns list data and XSLT into the view you see when you browse to a SharePoint page. The data comes from an SPDataSource control, but unlike the DataFormWebPart, the SPDataSource control is dynamically generated from the ViewXML in the diagram below. The SPDataSource control produces an XML rowset containing the list data. The ViewXML gets enhanced with list schema information and added to the XML rowset containing the data. The XSLT is compiled into an XslCompiledTransform – and since we always use the same XSLT, it’s only compiled once per web server. The XML rowset, with both the data and the enhanced ViewXML, is passed into the XslCompiledTransform, and the HTML output goes into the page stream and onto the screen of your browser.

SL3Binding-1

In order to use this converter, you need to register it in the XAML page you’re going to use it in. Since I use it in multiple places in this project I’m doing, I did this in the App.xaml file:

SL3Binding-2

Data Binding XAML

With everything in place, I then write the pieces that fetched the data from SharePoint using the ClientOM and then bound it to the page’s DataContext property. Nothing fancy there… what I want to show you is the data binding syntax. When I data bound the ClientOM ListItem object I want to use my custom converter. I also want to pass in a parameter telling the converter which field to use.

In the following screenshot you can see how I’ve registered the converter for the Text property on both TextBox controls. Notice how one is using the Price field (which you’d get on the server like this: SPListItem[“Price”]) and a lookup field in the second (SPListItem[“Category”]).

SL3Binding-3

  • Share/Bookmark

SharePoint 2010 List Schema Designer for Visual Studio 2010 published

Today we published a code sample that implements a List Schema Designer for Visual Studio 2010 SharePoint projects. This is available as sample code that you can reference for your own designers or you can build and use yourself. You can get the version for Visual Studio 2010 beta here.

The extension adds an “Open in Designer” right menu command to list schema project items. Here’s what the designer looks like.

WindowsLiveWriter/SharePoint2010ListSchemaDesignerforVisua_9B91/image_thumb.png” width=”544″ height=”415″ />

Please send me feedback on the designer. We will do some more work on this and publish an update for the release of Visual Studio 2010.

  • Share/Bookmark

SharePoint 2010 List View Blog Series: Part 2 – Using the New SharePoint Lists

Hi!   I’m Jason Morrill, another Program Manager on the SharePoint team.   I wanted to write a bit about what it feels like to use SharePoint lists with the new user experience.   If you’ve got a SharePoint site sitting around, I’d encourage you to open it in another window and follow along as I talk about things.
Let’s start by just browsing to a document library with no content.

 

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog1_thumb.png” width=”644″ height=”198″ />

The first thing you’ll notice is that we’ve moved some of the navigation and menus around.   The stuff right in the middle (Site Name > Document Library > All Documents) is your current location.   You can click on the Site Name to get back home, and you can click on the view name (All Documents) to switch to another view.   Above the title, you see there’s a black row – this is where you go to access all your commands. I’ll talk more about that later.   Below the title, you see the list view items.   Right now there are no items, so let’s fix that.  

To add an item to this library, you can click on the Add document button in the view. That button will always be available at the end of the current page, if you want to quickly add documents to this library. When you click it, you’ll notice that instead of navigating the entire page, we just put up a dialog asking you where you want to upload. This makes it faster to load and also easier to understand what’s going on. For this post, I actually want to upload multiple files – so go ahead and click on Upload Multiple Files. You’ll see something like this:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog2_thumb.png” width=”644″ height=”440″ />

You can drag files onto the blue rectangle to add them to your upload list, or you can click on Browse for files instead to find the files in a Windows dialog. Once you’ve picked them, click Ok and they will start uploading. When the page refreshes, you’ll see lot of items in the view. If you hover over one, you’ll notice that the row gets highlighted:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog3_thumb.png” width=”644″ height=”160″ />

You can click on the dropdown arrow in the middle of the row to see a menu of commands for this document. However, you can also click anywhere else on the row (well, anywhere that’s not a link) to select the document. This will automatically open a menu of all the available commands for the selected document:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog4_thumb.png” width=”644″ height=”158″ />

This menu is where you can find all the commands in SharePoint. Sometimes, it will open automatically (like when you select an item). But, if you want to open it manually, you can always click on one of the tab names. Once it is open, you can look through the various available tabs by clicking on their names. The names generally describe the thing the command affects, so if you click on Library you are looking at commands you can perform on the Document Library. Commands on the Documents tab are relevant to the currently selected document or documents.

When the ribbon opened, you might have noticed that it covered up the page title. We did that to save space, but if you ever want to get back to the page title, you can just click on Browse:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog5_thumb.png” width=”644″ height=”166″ />

Changing ribbon tabs won’t change what items you have selected, so it’s always safe to click around looking for the command you want.

Now, go ahead and click back on the Documents tab and look through the available commands. You’ll notice that you can do all the familiar SharePoint actions from here. Go ahead and click on Edit Properties, and you’ll see the form pop up in another dialog. You can make whatever changes you want, click Save and we’ll drop you right back on the same page again, quick and easy.

In addition to just selecting one item, you can select multiple items. To do that, just click on the check box that appears on the left of each row when you hover over it:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog6_thumb.png” width=”644″ height=”179″ />

Not all commands work on multiple items, and you’ll notice that the ribbon has greyed out commands that can’t be used. This multiple selection makes it easy to delete, check in and check out many files at once.

Once you’ve added enough items, the view will start to page. This means that you’ll need to click on the next page arrow at the bottom of the view to see more of what’s in the list:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog7_thumb.png” width=”644″ height=”114″ />

You can control the number of items shown on each page from the Modify View page, which can be accessed from the Library tab (just to the right of the Documents tab we were looking at earlier):

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog8_thumb.png” width=”644″ height=”85″ />

In addition to modifying the current view, the Library tab also allows you to switch views and use the datasheet. You can also create new columns, connect the lists to client applications – like Excel, Windows Explorer or SharePoint Workspaces – and customize the list’s forms, workflows or other settings.

By looking through those commands, there’s obviously a lot more that can be done with SharePoint lists. But, with what I’ve shown above, you should be able to get around your lists and libraries with relative ease. Good luck!

  • Share/Bookmark

SharePoint 2010 List View Blog Series: Part 2 – Using the New SharePoint Lists

Hi!   I’m Jason Morrill, another Program Manager on the SharePoint team.   I wanted to write a bit about what it feels like to use SharePoint lists with the new user experience.   If you’ve got a SharePoint site sitting around, I’d encourage you to open it in another window and follow along as I talk about things.
Let’s start by just browsing to a document library with no content.

 

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog1_thumb.png” style=”border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px” title=”lvblog1″ width=”644″ />

The first thing you’ll notice is that we’ve moved some of the navigation and menus around.   The stuff right in the middle (Site Name > Document Library > All Documents) is your current location.   You can click on the Site Name to get back home, and you can click on the view name (All Documents) to switch to another view.   Above the title, you see there’s a black row – this is where you go to access all your commands. I’ll talk more about that later.   Below the title, you see the list view items.   Right now there are no items, so let’s fix that.  

To add an item to this library, you can click on the Add document button in the view. That button will always be available at the end of the current page, if you want to quickly add documents to this library. When you click it, you’ll notice that instead of navigating the entire page, we just put up a dialog asking you where you want to upload. This makes it faster to load and also easier to understand what’s going on. For this post, I actually want to upload multiple files – so go ahead and click on Upload Multiple Files. You’ll see something like this:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog2_thumb.png” style=”border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px” title=”lvblog2″ width=”644″ />

You can drag files onto the blue rectangle to add them to your upload list, or you can click on Browse for files instead to find the files in a Windows dialog. Once you’ve picked them, click Ok and they will start uploading. When the page refreshes, you’ll see lot of items in the view. If you hover over one, you’ll notice that the row gets highlighted:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog3_thumb.png” style=”border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px” title=”lvblog3″ width=”644″ />

You can click on the dropdown arrow in the middle of the row to see a menu of commands for this document. However, you can also click anywhere else on the row (well, anywhere that’s not a link) to select the document. This will automatically open a menu of all the available commands for the selected document:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog4_thumb.png” style=”border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px” title=”lvblog4″ width=”644″ />

This menu is where you can find all the commands in SharePoint. Sometimes, it will open automatically (like when you select an item). But, if you want to open it manually, you can always click on one of the tab names. Once it is open, you can look through the various available tabs by clicking on their names. The names generally describe the thing the command affects, so if you click on Library you are looking at commands you can perform on the Document Library. Commands on the Documents tab are relevant to the currently selected document or documents.

When the ribbon opened, you might have noticed that it covered up the page title. We did that to save space, but if you ever want to get back to the page title, you can just click on Browse:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog5_thumb.png” style=”border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px” title=”lvblog5″ width=”644″ />

Changing ribbon tabs won’t change what items you have selected, so it’s always safe to click around looking for the command you want.

Now, go ahead and click back on the Documents tab and look through the available commands. You’ll notice that you can do all the familiar SharePoint actions from here. Go ahead and click on Edit Properties, and you’ll see the form pop up in another dialog. You can make whatever changes you want, click Save and we’ll drop you right back on the same page again, quick and easy.

In addition to just selecting one item, you can select multiple items. To do that, just click on the check box that appears on the left of each row when you hover over it:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog6_thumb.png” style=”border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px” title=”lvblog6″ width=”644″ />

Not all commands work on multiple items, and you’ll notice that the ribbon has greyed out commands that can’t be used. This multiple selection makes it easy to delete, check in and check out many files at once.

Once you’ve added enough items, the view will start to page. This means that you’ll need to click on the next page arrow at the bottom of the view to see more of what’s in the list:

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog7_thumb.png” style=”border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px” title=”lvblog7″ width=”644″ />

You can control the number of items shown on each page from the Modify View page, which can be accessed from the Library tab (just to the right of the Documents tab we were looking at earlier):

WindowsLiveWriter/SharePoint2010ListViewBlogSeriesPart2Usi_C1D4/lvblog8_thumb.png” style=”border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px” title=”lvblog8″ width=”644″ />

In addition to modifying the current view, the Library tab also allows you to switch views and use the datasheet. You can also create new columns, connect the lists to client applications – like Excel, Windows Explorer or SharePoint Workspaces – and customize the list’s forms, workflows or other settings.

By looking through those commands, there’s obviously a lot more that can be done with SharePoint lists. But, with what I’ve shown above, you should be able to get around your lists and libraries with relative ease. Good luck!

  • Share/Bookmark