List View Web Part

There is no Web Part called List View. When you create a new site from a site template, Web Parts (Web Part: A modular unit of information that consists of a title bar, a frame, and content. Web Parts are the basic building blocks of a Web Part Page.) are automatically added to the site home page. For example, a team site includes Announcements, Calendar, and Links Web Parts. These Web Parts are instances of the List View Web Part that use a preconfigured list template to display list data.

Similarly, when you create a list or library on your site, a List View Web Part of the same name as the list or library is automatically created. For example, if you create a list called Contracts, a List View Web Part called Contracts will be available in the Site Name Gallery. The Web Part automatically displays the data contained in the list or library that you created.



Ways you can use the List View Web Part

You can use the List View Web Part to display and edit list or library data in your site and to connect to other Web Parts, including other List View Web Parts. Lists are information that you share with team members and often display in tabular format. List views display this information in different ways for different purposes, such as filtering, sorting, or selecting specific columns.

You can display most lists and List View Web Parts in one of two tabular views: standard view, which is available to any user, and datasheet view. Datasheet view requires a program or control that is compatible with Microsoft Windows SharePoint Services, such as Microsoft Office Access 2007, and ActiveX control (ActiveX control: A control, such as a check box or button that offers options to users or runs macros or scripts that automate a task. You can write macros for the control in Microsoft Visual Basic for Applications or scripts in Microsoft Script Editor.) support.

You can use the List View Web Part to do the following:

  • Display list data on a Web Part Page in a tabular format to quickly sort, filter, isolate, and update the data.
  • Display in a List View Web Part the documents that are ready for team review or the documents that your group uses frequently.
  • Track project data in a List View Web Part and filter or sort the data by a column that contains a person's name or job assignment from a matching column in a connected Contacts List View Web Part.
  • From an Employee Basics List View Web Part that contains an employee name and ID number, look up detailed employee information, such as benefit options, family status, and medical insurance coverage, in a connected Employee Details List View Web Part.
  • Examine a complete customer order in two connected List View Web Parts: an Order List View Web Part that contains the order information and an Order Details List View Web Part that contains all the line items for that order.
  • Visually enhance basic information about a person in a Contacts List View Web Part by displaying a picture of that person in a connected Image Web Part or a map of that person's business address in a connected custom Map Web Part.

Find links to more information about customizing different types of Web Parts in the See Also section.

Top of Page Top of Page

Customize the view of a list or library in a Web Part

After you add a List View Web Part to a Web Part Page, you can customize the view to show only the information that you want to display on the page. You edit the current view from the Web Part Page.

You can also create custom views of a list or library, which you can use to display different sets of information in different instances of the Web Part for that list or library. You create custom views of a list or library by using the View menu View menu on the list or library that you want to customize. Find links to more information about creating custom views of a list or library in the See Also section.

  • On the Site Actions menu Site Actions menu, click Edit Page.
  • Click the Web Part menu Web Part Edit Menu of the Web Part that you want to customize, and then click Modify Shared Web Part.
  • In the tool pane, click Edit the current view.
  • In the Columns section, you can show or hide columns by selecting the appropriate check boxes. Next to the column name, enter the number for the order of your column in the view.
  • In the Sort section, choose whether and how you want the information to be sorted. You can use two columns for the sort, such as first by author, and then by file name for each author.
  • In the Filter section, choose whether and how you want to filter the information. A filtered view shows you a smaller selection, such as items created by a specific department or with an Approved status.
  • In the Group By section, you can group items with the same value in their own section, such as an expandable section for documents by a specific author.
  • In the Totals section, you can count the number of items in a column, such as the total number of issues. In some cases, you can summarize or distill additional information, such as averages.
  • In the Style section, select the style that you want for the view, such as a shaded list in which every other row is shaded.
  • If your list or library has folders, you can create a view that doesn't include the folders. This is sometimes called a flat view. To view all your list items at the same level, click Show all items without folders.
  • If your list or library is large, you can limit how many files can be viewed in the list or library or how many files can be viewed on the same page. In the Item Limit section, select the options that you want.
  • If you plan to view the list or library on a mobile device, select the options that you want in the Mobile section.
  • Click OK.

Top of Page Top of Page

Connect a List View Web Part to another Web Part

You can display most lists and List View Web Parts in one of two tabular views: standard view, which is available to any user, and datasheet view. Datasheet view requires a program or control that is compatible with Microsoft Windows SharePoint Services, such as Office Access 2007, and ActiveX control support.

By using either standard view or datasheet view, you can connect a List View Web Part to another Web Part, provide data to it, and change the way the data is displayed in the other Web Part, including another List View Web Part.

  1. On the Site Actions menu Site Actions menu, click Edit Page.
  2. Click the Web Part menu Web Part Edit Menu, and then point to Connections.
  3. Point to Provide Row To or Get Sort/Filter From, and then click the name of the Web Part to which you want to link.

ShowKey to commands on the Connections submenu

Command on the submenu Description
Provide Row To

You can connect the List View Web Part to another Web Part by passing a selected row of data to the other Web Part. Depending on how the other Web Part was created and gets the data, the other Web Part might display the row data or use the row data as a filter or parameter value.

In standard view, a Select Item column containing option buttons is automatically added when you connect the List View Web Part, so that you can indicate which row to pass to the other Web Part. You can select only one row at a time in standard view. Some columns, such as the Edit column, are not available for use in a Web Part connection.

In datasheet view, you can select multiple rows, but only one row is passed to the other Web Part. If multiple rows are selected, the row containing the active cell is passed to the other Web Part, and all other rows are ignored. You cannot provide data in the Total row or New row to the other Web Part.

With this type of connection, you can have more than one Web Part connected to the List View Web Part.

Provide Data To

You can connect the List View Web Part to another Web Part that works with list data. In this case, the List View Web Part is the data source for the other Web Part.

In standard and datasheet view, only the data in the view is provided to the other Web Part.

With this type of connection, you can have more than one Web Part connected to the List View Web Part.

Get Sort/Filter From

In standard and datasheet view, you can connect the List View Web Part to another Web Part that can provide the following information to it:

  • One or more column name and value pairs of data that filter data in the List View Web Part.
  • A column of data to sort data by either ascending or descending order in the List View Web Part.

With this type of connection, only one other Web Part can be connected to the List View Web Part.

All the List View Web Parts on your site are usually available in the Site Name Gallery. When you first add a List View Web Part from a Web Part gallery to the Web Part Page, the Web Part Page displays the default list view in the Web Part. To display the data that you want in the List View Web Part as well as the other connected Web Part, you may need to edit the view of the list. For example, you may want to filter, sort, or group data a different way or display different columns.

You can change the list view from the custom properties List Views section of the tool pane in one of two ways:

  • Select a different view from the Selected View property.
  • Click Edit the current view to edit the current view.

Whenever you select or edit a list view, a copy of the list design is made from the original site list design and saved with the List View Web Part. However, the list data remains the same.

Be careful when you switch to a different view from the current view. You may delete changes that you made to the current view and may disable Web Part connections that depend on columns in the current view. You are prompted for confirmation if you switch views.

Top of Page Top of Page

Supported list types that can be connected

Although you can display all list types in a List View Web Part, only certain list types are supported when you make a Web Part connection. In general, list types that display data in tabular format, such as Contacts, are supported. Lists that display data in a nontabular format, such as folder view, are not supported. The supported and unsupported list types are listed below.

Supported list types Unsupported list types
  • Announcements
  • Contacts
  • Events
  • Issues
  • Links
  • Tasks
  • Custom lists
  • Lists that contain data imported from a spreadsheet
  • Document libraries
  • Form libraries
  • Calendar view of an Events list
  • Discussion boards
  • Surveys
  • Picture libraries
  • Site and list template catalogs
  • Web Part galleries
  • Data sources

Top of Page Top of Page

Supported list column types that can be connected

Although you can display all list column types in a List View Web Part, only certain list column types are supported when you make a Web Part connection. The supported and unsupported list column types are listed below.

Supported list column types Unsupported list column types
  • Single line of text
  • Choice
  • Number
  • Currency
  • Date and Time
  • Hyperlink or Picture (for matching columns)
  • Lookup
  • Yes/No
  • Calculated
  • Hyperlink or picture (for filtering)
  • Multiple lines of text
  • Edit

Top of Page Top of Page

Custom properties of the List View Web Part

The custom properties of the List View Web Part are listed below.

 Note   You cannot view or edit any of these custom properties in personal view.

Property Description
Selected View

Be careful when you switch to a different view from the current view. You may delete changes that you made to the current view and may disable Web Part connections that depend on columns in the current view. You are prompted for confirmation if you switch views.

Specifies a list view to display in the Web Part. You can select one of the following:

  • All List name or All Documents    This property displays all columns in the list or library, depending on the list type.

 Note   Before you click OK or Apply, select <Current view> to revert to the last view that was used and to ignore unsaved changes that you made to the copy of the list view design information. After you click OK or Apply, the changes you made are applied to the new current view and saved with the List View Web Part.

  • Explorer View    This property displays the contents of a document library by using icons only, similar to Windows Explorer. This view is available only for document libraries.
  • <Summary View>    This property displays the summary view of the list. This view varies among list types.
  • Additional list views    This property displays user-defined views or other default views, depending on the list type.
Edit the current view

Select Edit the current view to edit the current view used in the Web Part, including the columns displayed, the sort order and filter used, whether to display totals, and the item limit.

Whenever you select or edit a list view, a copy of the list design information is made from the original site list design and saved with the List View Web Part. However, the list data remains the same.

Toolbar Type

Specifies the way the list toolbar is displayed or whether it is displayed at all. Select from one of three options:

Summary Toolbar    This option displays the summary toolbar for the currently selected list view. This is the default value for most list types, except for custom lists.

Full Toolbar    This option displays the entire toolbar for the currently selected list view. This is the default value for custom lists.

No Toolbar    No toolbar is displayed.

Top of Page Top of Page

Common properties of Web Parts

All Web Parts share a common set of properties that control their appearance, layout, and advanced characteristics.

 Note   The common Web Part properties that you see in the tool pane may be different from what is documented in this section for several reasons:

  • To see the Advanced section in the tool pane, you must have appropriate permission.
  • For a specific Web Part, a Web Part developer may have chosen not to display one or more of these common properties or may have chosen to create and display additional properties that are not listed below in the Appearance, Layout, and Advanced sections of the tool pane.
  • Some permission and property settings may disable or hide Web Part properties.

Appearance

Property Description
Title Specifies the title of the Web Part that appears in the Web Part title bar.
Height Specifies the height of the Web Part.
Width Specifies the width of the Web Part.
Chrome State Specifies whether the entire Web Part appears on the page when a user opens the Web Part Page. By default, the chrome state is set to Normal and the entire Web Part appears. Only the title bar appears when the state is set to Minimized.
Chrome Type Specifies whether the title bar and border of the Web Part frame are displayed.

Layout

Property Description
Hidden

Specifies whether the Web Part is visible when a user opens the Web Part Page. If the check box is selected, the Web Part is visible only when you are designing the page and has the suffix (Hidden) appended to the title.

You can hide a Web Part if you want to use it to provide data to another Web Part through a Web Part connection, but you don't want to display the Web Part.

Direction Specifies the direction of the text in the Web Part content. For example, Arabic is a right-to-left language; English and most other European languages are left-to-right languages. This setting may not be available for all types of Web Parts.
Zone

Specifies the zone on the Web Part Page where the Web Part is located.

 Note   Zones on the Web Part Page are not listed in the list box when you do not have permission to modify the zone.

Zone Index

Specifies the position of the Web Part in a zone when the zone contains more than one Web Part.

To specify the order, type a positive integer in the text box.

If the Web Parts in the zone are ordered from top to bottom, a value of 1 means that the Web Part appears at the top of the zone. If the Web Parts in the zone are ordered from left to right, a value of 1 means that the Web Part appears on the left of the zone.

For example, when you add a Web Part to an empty zone that is ordered from top to bottom, the Zone Index is 0. When you add a second Web Part to the bottom of the zone, its Zone Index is 1. To move the second Web Part to the top of the zone, type 0, and then type 1 for the first Web Part.

 Note   Each Web Part in the zone must have a unique Zone Index value. Therefore, changing the Zone Index value for the current Web Part can also change the Zone Index value for other Web Parts in the zone.

Advanced

Property Description
Allow Minimize Specifies whether the Web Part can be minimized.
Allow Close Specifies whether the Web Part can be removed from the Web Part Page.
Allow Hide Specifies whether the Web Part can be hidden.
Allow Zone Change Specifies whether the Web Part can be moved to a different zone.
Allow Connections Specifies whether the Web Part can participate in connections with other Web Parts.
Allow Editing in Personal View Specifies whether the Web Part properties can be modified in a personal view.
Export Mode Specifies the level of data that is permitted to be exported for this Web Part. Depending on your configuration, this setting may not be available.
Title URL Specifies the URL of a file containing additional information about the Web Part. The file is displayed in a separate browser window when you click the Web Part title.
Description Specifies the ScreenTip that appears when you rest the mouse pointer on the Web Part title or Web Part icon. The value of this property is used when you search for Web Parts by using the Search command on the Find Web Parts menu of the tool pane in the following Web Part galleries: Site, Virtual Server, and Web Part Page.
Help URL Specifies the location of a file containing Help information about the Web Part. The Help information is displayed in a separate browser window when you click the Help command on the Web Part menu.
Help Mode

Specifies how a browser will display Help content for a Web Part.

Select one of the following:

  1. Modal Opens a separate browser window, if the browser has this capability. A user must close the window before returning to the Web page.
  2. Modeless Opens a separate browser window, if the browser has this capability. A user does not have to close the window before returning to the Web page. This is the default value.
  3. Navigate Opens the Web page in the current browser window.

 Note   Even though custom Microsoft ASP.NET Web Parts support this property, default Windows SharePoint Services 3.0 Help topics open only in a separate browser window.

Catalog Icon Image URL Specifies the location of a file containing an image to be used as the Web Part icon in the Web Part List. The image size must be 16 by 16 pixels.
Title Icon Image URL Specifies the location of a file containing an image to be used in the Web Part title bar. The image size must be 16 by 16 pixels.
Import Error Message Specifies a message that appears if there is a problem importing the Web Part.

Top of Page Top of Page

 
 
Applies to:
SharePoint Server 2007, Windows SharePoint Services 3.0