Docs

Documentation versions (currently viewingVaadin 24)

Tree Grid

The Tree Grid component displays hierarchical tabular data grouped in expandable nodes.

Tree Grid is a component for displaying hierarchical tabular data grouped into expandable nodes.

Open in a
new tab
Source code
TreeGridBasic.java
Person.java
tree-grid-basic.tsx
tree-grid-basic.ts
Note
Tree Grid is an extension of the Grid component. Therefore, all of Grid’s features are available in Tree Grid. However, Tree Grid isn’t meant to be used as a navigation menu.

Tree Column

The tree column contains the toggles for expanding and collapsing nodes. Nodes are opened and closed by clicking a tree column’s cell. They can also be toggled programmatically.

Open in a
new tab
Source code
TreeGridColumn.java
Person.java
tree-grid-column.tsx
tree-grid-column.ts

Rich Content

Like Grid, Tree Grid supports rich content.

Open in a
new tab
Source code
TreeGridRichContent.java
Person.java
tree-grid-rich-content.tsx
tree-grid-rich-content.ts

Programmatic Scrolling

Grid supports programmatic navigation to a specific row. This is particularly useful when dealing with large data sets. It saves users from having to scroll through potentially hundreds or thousands of rows.

To use this feature, you need to specify the index of the row you want to view. The scroll position of the grid will then be adjusted to bring that row into view.

With multiple levels of hierarchy, you need to specify the row index for each level, separately. For example, to scroll to the second child-row (index 1) of the third root-level row (index 2), you would provide the indexes 2, 1.

Open in a
new tab
Source code
TreeGridScrollToIndex.java
tree-grid-scroll-to-index.tsx
tree-grid-scroll-to-index.ts
Component Usage Recommendation

Grid

Component for showing tabular data.

Grid Pro

Component for showing and editing tabular data.

CRUD

Component for creating, displaying, updating, and deleting tabular data.

9DEF736F-975A-469A-8625-A0A6E086BF50