Skip to content

Data Table Widget

A Data Table Widget builds UI for a Data Table using a row prefab for each row in the table.

DataTableWidget

Use it for scoreboards, inventories, quest logs, player lists, etc.

Setup

Create a Data Definition with your fields:

HighScore

Create a Data Table that uses that definition:

HighScores

Add a Canvas to your scene for your UI:

DataTableHierarchy

The content root should have a Layout Group:

DataTableLayoutGroup

Build a row prefab:

HighScoreUI

Add a Data Item UI component to bind fields to UI components:

HighScoreItemUI

Add a DataTableWidget to the scene (commonly on the canvas):

DataTableWidget

The widget references all the elements, tying them together:

  • Table: The DataTable asset or component to use.
  • Content: The UI root to add rows to. Should use a layout group.
  • Row Prefab: The row prefab used to build each row in the table.

Data Item UI

The row prefab should use Data Item UI to connect data definition fields to UI elements.

It can also contain components that send commands to the DataTableWidget:

Common commands include Select, ToggleSelect, Delete, MoveUp, MoveDown, and drag lifecycle commands when reorder is enabled.

The DataTableWidget handles these commands and updates the source table automatically.

DataTableWidget integrates with Unity Selectable navigation for row-to-row movement and edge behavior.

  • Row links are configured automatically for visible rows.
  • At the table edges, behavior follows Row Navigation Mode: Default, Lock To Table, or Wrap.
  • Navigation Action Mode controls whether navigation input does focus only, row select, or row move behavior.

For complete setup details, see Data Table Navigation.

Components Used

A full setup commonly uses:

Actions

Use these actions to work with DataTableWidgets in FSMs:

See Also