Back to compare picker

Tree grid vs Data grid vs Tree selection vs Table

Choose tree grid when rows have parent-child hierarchy and users must compare, edit, select, sort, or act on values across shared columns.

Decision dimensions

Dimension Tree gridData gridTree selectionTable
UI or UX UI + UX - Hierarchical interactive row-and-column data workspaceUI + UX - Interactive row-and-column data workspaceUI + UX - Hierarchical expandable selection treeUI + UX - Semantic row-and-column data comparison surface
UI guidance Render a labelled tree grid with a persistent hierarchy column, visible column headers, indentation by level, expandable parent rows, leaf rows without fake expand controls, and status text for visible rows, selected descendants, sort, filter, and loading children.Render the grid as a named work surface with visible headers, row identifiers, focus location, selection state, dirty and invalid cell markers, column controls, and status text for row count, sort, filter, and save state.Render a labelled tree with visible levels, branch expanders, parent versus leaf styling, active focus, selected or checked state, parent mixed state, and a summary for selected descendants hidden inside collapsed branches.Render a table with a specific caption or heading, visible column headers, optional row headers, aligned values, consistent row actions, and enough spacing for scanability.
UX guidance Use tree grid when users need to keep hierarchy and column comparison in one workspace, especially for nested operational records that can be expanded, selected, edited, or acted on in context.Use a data grid when cell-level interaction makes users faster and more accurate than opening each record separately.Use tree selection when users need to choose one or more items from a meaningful hierarchy and the parent-child structure helps them find, understand, or batch-select nodes.Use tables when aligned columns help users compare records, find exceptions, audit values, or triage work faster than opening each item.
Good UI A project work-breakdown tree grid shows parent rows for phases, child rows for tasks, columns for Owner, Due, Status, and Cost, and a collapsed parent badge that says 2 selected children.An invoice-review grid shows frozen invoice IDs, column headers for Vendor, Amount, Due, Owner, and Status, one highlighted focused cell, two selected rows, a dirty edited amount, and a status line naming the current cell.A permissions picker shows Workspace, Reports, Billing, and Security branches with disclosure controls, selected leaf nodes, a mixed Reports parent, and a selected-count summary on collapsed parents.A payment review table has the caption June vendor payments, headers Vendor, Status, Due date, Amount, and Action, right-aligned amounts, and row actions labelled by vendor.
Bad UI A flat data grid uses chevron icons in every first cell but no row actually owns children.A static report uses role grid even though users only read values and ordinary table semantics would be clearer.A nested checkbox list uses indentation but no tree role, no active row, no branch expanded state, and no keyboard model beyond tabbing through every checkbox.A div layout looks like columns but has no caption, table semantics, or header associations.
Good UX A user expands Design, edits a child task status, collapses Design, sees a dirty-child badge on the parent, re-expands, and focus returns to the edited child row.A user presses Arrow Right to move from Amount to Due, presses Enter to edit the due date, presses Escape to cancel, and focus returns to the same cell in navigation mode.A user focuses Reports, presses Right Arrow to open it, moves to Monthly revenue, presses Space to select it, and the Reports parent becomes mixed.A user sorts by Amount descending, filters to Pending, moves to page 2, and the table keeps its caption, active sort, active filter, row count, and selected payment context.
Bad UX A user collapses a parent and unknowingly hides a selected invalid child row before bulk approval.A user edits an amount, sorts by status, and the row disappears with no saved or unsaved indication.A user arrows through the permission tree to explore branches and accidentally changes selected permissions because selection follows focus in a multi-select tree.Filtering the table removes selected rows without explaining why or offering a clear-filter path.
Best fit Rows have real parent-child hierarchy and shared comparable columns.Users repeatedly inspect or update many records in shared columns.Users choose one or more values from a meaningful hierarchy.Records share comparable attributes that users need to scan in aligned columns.
Avoid when Rows are flat or only visually grouped.The data is read-only and ordinary table navigation is enough.The options are flat or only loosely grouped.The content is layout, not data.
Required state Default tree grid state with label, column headers, visible root rows, row hierarchy, row count context, and focused row or cell.Default navigation state with labelled grid, column headers, row headers or row identifiers, focused cell, and row count context.Initial tree state with visible label and root-level nodes.Default table state with caption, visible headers, row values, and result count or context.
Accessibility burden Use treegrid semantics only when rows can expand or collapse and the content also behaves as a grid.Use grid semantics only for an interactive composite widget with managed focus.Use role tree on the container and provide an accessible name.Use native table semantics for tabular data rather than div-only rows.
Common misuse Using treegrid for a flat data grid with no expandable parent rows.Using role grid on a static table only to make it sound richer.Using tree selection for a flat list where listbox, checkbox group, or multi-select would be simpler.Using table markup to create page columns or layout spacing.

Tree grid

UI or UX
UI + UX - Hierarchical interactive row-and-column data workspace
UI guidance
Render a labelled tree grid with a persistent hierarchy column, visible column headers, indentation by level, expandable parent rows, leaf rows without fake expand controls, and status text for visible rows, selected descendants, sort, filter, and loading children.
UX guidance
Use tree grid when users need to keep hierarchy and column comparison in one workspace, especially for nested operational records that can be expanded, selected, edited, or acted on in context.
Good UI
A project work-breakdown tree grid shows parent rows for phases, child rows for tasks, columns for Owner, Due, Status, and Cost, and a collapsed parent badge that says 2 selected children.
Bad UI
A flat data grid uses chevron icons in every first cell but no row actually owns children.
Good UX
A user expands Design, edits a child task status, collapses Design, sees a dirty-child badge on the parent, re-expands, and focus returns to the edited child row.
Bad UX
A user collapses a parent and unknowingly hides a selected invalid child row before bulk approval.
Best fit
Rows have real parent-child hierarchy and shared comparable columns.
Avoid when
Rows are flat or only visually grouped.
Required state
Default tree grid state with label, column headers, visible root rows, row hierarchy, row count context, and focused row or cell.
Accessibility burden
Use treegrid semantics only when rows can expand or collapse and the content also behaves as a grid.
Common misuse
Using treegrid for a flat data grid with no expandable parent rows.

Data grid

UI or UX
UI + UX - Interactive row-and-column data workspace
UI guidance
Render the grid as a named work surface with visible headers, row identifiers, focus location, selection state, dirty and invalid cell markers, column controls, and status text for row count, sort, filter, and save state.
UX guidance
Use a data grid when cell-level interaction makes users faster and more accurate than opening each record separately.
Good UI
An invoice-review grid shows frozen invoice IDs, column headers for Vendor, Amount, Due, Owner, and Status, one highlighted focused cell, two selected rows, a dirty edited amount, and a status line naming the current cell.
Bad UI
A static report uses role grid even though users only read values and ordinary table semantics would be clearer.
Good UX
A user presses Arrow Right to move from Amount to Due, presses Enter to edit the due date, presses Escape to cancel, and focus returns to the same cell in navigation mode.
Bad UX
A user edits an amount, sorts by status, and the row disappears with no saved or unsaved indication.
Best fit
Users repeatedly inspect or update many records in shared columns.
Avoid when
The data is read-only and ordinary table navigation is enough.
Required state
Default navigation state with labelled grid, column headers, row headers or row identifiers, focused cell, and row count context.
Accessibility burden
Use grid semantics only for an interactive composite widget with managed focus.
Common misuse
Using role grid on a static table only to make it sound richer.

Tree selection

UI or UX
UI + UX - Hierarchical expandable selection tree
UI guidance
Render a labelled tree with visible levels, branch expanders, parent versus leaf styling, active focus, selected or checked state, parent mixed state, and a summary for selected descendants hidden inside collapsed branches.
UX guidance
Use tree selection when users need to choose one or more items from a meaningful hierarchy and the parent-child structure helps them find, understand, or batch-select nodes.
Good UI
A permissions picker shows Workspace, Reports, Billing, and Security branches with disclosure controls, selected leaf nodes, a mixed Reports parent, and a selected-count summary on collapsed parents.
Bad UI
A nested checkbox list uses indentation but no tree role, no active row, no branch expanded state, and no keyboard model beyond tabbing through every checkbox.
Good UX
A user focuses Reports, presses Right Arrow to open it, moves to Monthly revenue, presses Space to select it, and the Reports parent becomes mixed.
Bad UX
A user arrows through the permission tree to explore branches and accidentally changes selected permissions because selection follows focus in a multi-select tree.
Best fit
Users choose one or more values from a meaningful hierarchy.
Avoid when
The options are flat or only loosely grouped.
Required state
Initial tree state with visible label and root-level nodes.
Accessibility burden
Use role tree on the container and provide an accessible name.
Common misuse
Using tree selection for a flat list where listbox, checkbox group, or multi-select would be simpler.

Table

UI or UX
UI + UX - Semantic row-and-column data comparison surface
UI guidance
Render a table with a specific caption or heading, visible column headers, optional row headers, aligned values, consistent row actions, and enough spacing for scanability.
UX guidance
Use tables when aligned columns help users compare records, find exceptions, audit values, or triage work faster than opening each item.
Good UI
A payment review table has the caption June vendor payments, headers Vendor, Status, Due date, Amount, and Action, right-aligned amounts, and row actions labelled by vendor.
Bad UI
A div layout looks like columns but has no caption, table semantics, or header associations.
Good UX
A user sorts by Amount descending, filters to Pending, moves to page 2, and the table keeps its caption, active sort, active filter, row count, and selected payment context.
Bad UX
Filtering the table removes selected rows without explaining why or offering a clear-filter path.
Best fit
Records share comparable attributes that users need to scan in aligned columns.
Avoid when
The content is layout, not data.
Required state
Default table state with caption, visible headers, row values, and result count or context.
Accessibility burden
Use native table semantics for tabular data rather than div-only rows.
Common misuse
Using table markup to create page columns or layout spacing.
Decision rules
  • Choose tree grid when rows have parent-child hierarchy and users must compare, edit, select, sort, or act on values across shared columns.
  • Choose data grid when rows are flat or grouping is only a view option, and the primary task is cell navigation, editing, selection, or spreadsheet-like work across columns.
  • Choose tree selection when users only choose nodes in a hierarchy and do not need tabular columns, editable cells, sortable headers, or per-column comparison.
  • Choose table when the data is read-only or mostly read-only and ordinary table navigation with row actions is sufficient.
  • A tree grid owns both expansion state and grid focus state: expand or collapse cannot hide the focused row, lose selected descendants silently, or make row and column indices untrue.
  • Do not use tree grid for ordinary navigation menus, folder trees with one label column, or settings forms with visual indentation but no repeated column meaning.
  • When a parent row summarizes children, define whether parent values are editable, aggregate-only, selectable with descendants, or readonly containers.
  • If sorting or filtering is available, define whether child rows stay under parents, whether empty parents remain visible, and how expanded state is preserved.
  • If virtualization or lazy loading is used, expose truthful row count, row index, level, set size, position in set, loading, and collapsed-descendant states.
  • On narrow screens, prefer a hierarchy list plus detail route when columns, expansion controls, and edit affordances cannot remain understandable together.
Inspect live examples
Failure modes
  • A flat data grid is given treegrid semantics even though no rows expand or collapse.
  • A tree selection widget grows columns and row actions but still exposes only treeitem behavior.
  • Collapsing a parent hides selected or dirty child rows without a warning, badge, or recovery path.
  • Sorting breaks hierarchy by scattering child rows away from their parents.
  • Leaf rows include aria-expanded, causing assistive technologies to describe every row as a parent.
  • Virtual or lazy-loaded rows report stale levels, row indices, set sizes, or focused-cell locations.