Add, Remove, Reorder, and Sort Columns

You can find specific work items and related information more easily by adding columns to the results list for a particular query. You can then highlight the most useful data if you sort the list by one or more columns. The default display columns are; ID, Work Item Type, Title, Assigned To, and State. These columns appear in the query results for all types of work items.

Note

The topic illustrates how to work in Team Explorer. You can perform similar procedures in Team Web Access, although the details differ slightly.

Requirements

Tip

For information about how to navigate within the query editor or query view using keyboard shortcuts, see Keyboard Shortcuts for the Query Editor and Query Results View.

To add, remove, and reorder columns

  1. In Team Explorer, open a work item query.

    For more information, see Query for Bugs, Tasks, or Other Work Items.

  2. On the query results toolbar, choose Column OptionsColumn Options.

  3. Perform one or more of the following steps:

    • In the Project or Work Item Type list, choose the appropriate option to display only those columns that are defined for a particular team project or type of work item.

      Note

      You should filter the list of columns if you want to focus on a specific type of work item in your query results or if your query results contain work items from other team projects.

    • In the Available columns list, choose a column that you want to add, and then choose > (Add selected columns).

    • In the Selected columns list, choose a column that you want to remove, and then choose < (Remove selected columns).

    • In the Selected columns list, choose a column that you want to appear in a different location in the results list, and then choose Move up or Move down (arrow that points up or arrow that points down).

      If you choose Move up, the column will appear on the left of the column that precedes it. If you choose Move down, the column will appear on the right side of the column that precedes it.

      Note

      In the results list, you can also change the order in which the columns appear by dragging a column to a different location.

    • In the Selected columns list, choose a column by which you want to sort your results list, and then choose Sort ascending or Sort descending.

      Note

      You can also sort a results list by a particular column by choosing the heading for that column.

  4. Choose OK.

To sort a list of results by a single column

  • From the query results list, choose the heading of the column by which you want to sort.

    You can choose the heading again to toggle the sorting order between ascending and descending.

To sort a list of results by multiple columns

  1. On the query toolbar, choose Column Options.

  2. In the Column Options dialog box, choose the Sorting tab.

  3. In the Available columns list, choose a column by which you want to sort, and then choose > (Add selected columns) .

    The column appears in the Selected columns list.

  4. Choose each column, and then choose Sort ascending or Sort descending.

  5. (Optional) Choose a column, and then choose Move up or Move down (arrow that points up or arrow that points down) to specify the sequence of columns by which you want to sort the results.

    Note

    In a list of results in Team Explorer, you can also hold down the SHIFT key and choose multiple columns in sequence to sort the list of query results.

  6. Choose OK.

To change the query results view

  • In Team Explorer, choose the Collapse upper panel or Collapse bottom panel buttons to collapse an upper or lower panel, or choose the Collapse left panel or Collapse right panel buttons to collapse the left or right panel.

  • In Team Web Access, choose the bottom, right, and off links to cycle through the choices of vertical stack, side-by-side, or results-only views.

  • In Team Web Access:

    • To collapse a node, choose Expand/Collapse (Expanded).

    • To expand a node, chooseExpand/Collapse (Collapsed).

  • In Team Explorer:

    • To collapse all nodes, choose Collapse all (Collapse All).

    • To collapse a single node, choose Collapse.

    • To expand all nodes, choose Expand all (Expand All).

    • To expand a single node, choose Expand.

See Also

Tasks

Work with a flat list (default) query

Work with linked hierarchies (Tree of Work Items)

Concepts

Query for Bugs, Tasks, or Other Work Items

Other Resources

Work with linked dependencies (Direct Links)