Skip to main content

DataTable

Use DataTable to display and manage datasets with rich interactions such as sorting, filtering, pagination, and row selection.

When to use

  • When users need to sort, filter, paginate, or interact with large or complex datasets.

When not to use

  • For a purely visual representation of tabular data without significant interactivity such as sorting or pagination. Use SimpleTable instead.

Visual configuration

DataTable supports configuration for its visual look, data density, and data point separation.

Container

Contained

  • Use the contained variant for most cases, and especially if it is prominent in the visual hierarchy of the view.

A DataTable in the contained style, with a bordered background that sets it apart from the surface.

A DataTable in the contained style, with a bordered background that sets it apart from the surface.

Uncontained

  • Always use the uncontained variant when it's the only element inside a Surface.
  • Use for a subtler appearance when the table is secondary in the visual hierarchy of the view.

A DataTable in the uncontained style, with no border or background, blending into the surface.

A DataTable in the uncontained style, with no border or background, blending into the surface.

Data density

DataTable comes with three density options that control the standard row height and whitespace in a cell.

Default

  • Use the default row density for datasets where users need to process and scan the information shown.

A DataTable with default row density, using standard row height and spacing.

A DataTable with default row density, using standard row height and spacing.

Condensed

  • Use the condensed row density to show more information in smaller areas and compact layouts. Consider that cell content might be more challenging for users to scan and distinguish.

A DataTable with condensed row density, using shorter rows to fit more data in less space.

A DataTable with condensed row density, using shorter rows to fit more data in less space.

Comfortable

  • Use the comfortable row density to improve readability for tables with visually crowded cell content and where extra space will support user experience. Consider that this density setting will show less information in the same area.

A DataTable with comfortable row density, using taller rows and extra whitespace for readability.

A DataTable with comfortable row density, using taller rows and extra whitespace for readability.

Data point separation

No separation

  • Use no visual data point separation for simple data sets, for example, a key-value list.

A DataTable with no data point separation, showing no dividing lines between rows.

A DataTable with no data point separation, showing no dividing lines between rows.

Horizontal dividers

  • Use horizontal dividers to highlight the distinction and separation between rows.

A DataTable with horizontal dividers separating each row.

A DataTable with horizontal dividers separating each row.

Zebra stripes

  • Consider using zebra stripes for large datasets where users may want to interact with one or more data points in the view to ensure easier scanning and distinction between rows.

A DataTable with zebra stripes, alternating the background color of each row.

A DataTable with zebra stripes, alternating the background color of each row.

Vertical dividers

  • Use vertical dividers to separate columns, especially when dealing with a relatively large amount of data points.

A DataTable with vertical dividers separating each column.

A DataTable with vertical dividers separating each column.

Combined separation

  • Combine zebra stripes and vertical dividers to establish a structured dataset, ensuring row and column distinction for effective readability.

A DataTable combining zebra stripes and vertical dividers for both row and column separation.

A DataTable combining zebra stripes and vertical dividers for both row and column separation.

Actions

DataTable supports actions at table, column, row, selected row(s), and cell level. Place each action at the level that matches what it affects.

Table actions

  • Use table actions for operations that affect the entire dataset, such as global sorting, filtering, or exporting.

A DataTable with table-level actions in a toolbar above it: a button to add a cluster, "Refresh", and "Open with".

A DataTable with table-level actions in a toolbar above it: a button to add a cluster, "Refresh", and "Open with".

Column actions

  • Use column actions for operations that affect a specific column, such as sorting or column visibility.

A DataTable with column actions: a menu on the Cluster column offering "Enable line wrap" and "Hide column".

A DataTable with column actions: a menu on the Cluster column offering "Enable line wrap" and "Hide column".

Row actions

  • Use row actions for operations related to specific rows, such as "Edit" or "View details".

A DataTable with row actions: an "Edit" button at the end of each row.

A DataTable with row actions: an "Edit" button at the end of each row.

Selected row actions

  • Use selected row actions for operations that users can perform on one or multiple selectable rows simultaneously.

A DataTable with selected row actions: two rows checked, showing a toolbar with "Edit config" and "Open with".

A DataTable with selected row actions: two rows checked, showing a toolbar with "Edit config" and "Open with".

Cell actions

  • Use cell actions for operations related to specific cells, such as "Copy to clipboard" or other context-specific activities for a particular piece of data.

A DataTable with cell actions: a menu on a CPU cell offering "Copy value".

A DataTable with cell actions: a menu on a CPU cell offering "Copy value".

Content guidelines

Table actions

Columns and rows

  • Column headers should be one or two simple words and sentence case.
  • If the column header is a noun, make it singular.
  • Action names can be one to three words. See Common actions for patterns.

Table data

  • Display data in a consistent format. Learn more about formatting data.
  • Show an empty state when there's no data or there's an error. Learn more about EmptyState.
Still have questions?
Find answers in the Dynatrace Community