Modify the columns in a Data View

After you create a Data View, to display different fields from your data source, you can add, remove, or arrange the columns in the existing Data View.

When you add, remove, or arrange the columns in a Data View, you are adding, removing, or arranging the fields as they appear in the Data View. If the Data View displays several fields, each in a different column, you can use the options in the Edit Columns dialog box to add, remove, or move the columns. If the Data View displays the fields in rows, you can use the options in the Edit Columns dialog box to add, remove, or move the rows.

Note

The Edit Columns command is available only when you are working with a Data View that displays data in an HTML table.

You can also use the table editing commands on the Table menu to modify the columns in a Data View.

To add columns

  1. In Design view, right-click the Data View, and then click Show Common Control Tasks.

  2. In the Common Data View Tasks list, click Edit Columns.

    Note

    The Edit Columns command is not available if the Data View is in an HTML table that uses rowspan or colspan attributes with a value greater than 1.

  3. In the Edit Columns dialog box, under Available fields, click the field that you want to include in the Data View, and then click Add. Repeat for each field that you want to add.

    Tip

    To select multiple fields at one time, press and hold CTRL while you click the fields.

    Note

    If you have changed the column headers in the Data View, the column headers, not the field names, are displayed in the Displayed Columns list.

To remove columns

  1. In Design view, right-click the Data View, and then click Show Common Control Tasks.

  2. In the Common Data View Tasks list, click Edit Columns.

  3. In the Edit Columns dialog box, under Displayed Columns, click the field that you want to remove from the Data View, and then click Remove. Repeat for each field that you want to remove.

    Tip

    To select multiple fields at one time, press and hold CTRL while you click the fields.

To arrange columns

  1. In Design view, click the Data View to select it.

  2. On the Data View menu, click Edit Columns.

  3. In the Edit Columns dialog box, under Displayed columns, click the field that you want to move in the Data View, and then click Move Up or Move Down. Repeat for each field that you want to move.

    Note

    Moving a field up in the list moves the column to the left in the Data View. Moving a field down in the list moves the column to the right.

See also

Tasks

Add a Data View
Apply conditional formatting to a Data View
Sort data in a Data View
Create a formula column in a Data View
Change the layout of a Data View
Filter data in a Data View
Add RSS feeds to a page
Display sample data in a Data View

Concepts

Data View

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.