> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/tree-grid.md).

# Tree Grid

Step-by-step tutorials for the Avonni Tree Grid in screen flows, from an account hierarchy to related records, selected rows and row actions.

The [Tree Grid](https://docs.avonnicomponents.com/flow/flow-components/tree-grid.md) shows records that belong to one another, such as a customer group and its subsidiaries, as rows that open onto their children on a flow screen. These tutorials follow one example: an account manager reviewing the Meridian group, its companies, contacts and open cases.

{% hint style="info" %}
New to the component? Start with [Show an account hierarchy](https://docs.avonnicomponents.com/flow/tutorials/components/tree-grid/show-an-account-hierarchy.md). The other tutorials reuse its flow and data.
{% endhint %}

## Build the tree

Bring your records into the grid: one object that points to itself, or several related objects nested level by level.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Show an account hierarchy</strong></td><td>Show the whole customer group around the account the user is on, parent and subsidiaries, in a screen flow Tree Grid built from one query.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fc3oZmWQDpU78luTWAHgP%2Fflow-hub-cover-tree-grid.png?alt=media">flow-hub-cover-tree-grid.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/tree-grid/show-an-account-hierarchy.md">Show an account hierarchy</a></td></tr><tr><td><strong>Browse accounts, contacts and cases</strong></td><td>Open each subsidiary onto its contacts and each contact onto their open cases, in one screen flow Tree Grid on the Account page, with three linked queries.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FVb5D8Kag4yTaeKsrOzAB%2Ftree-grid-cover-browse-accounts-contacts-and-cases.png?alt=media">tree-grid-cover-browse-accounts-contacts-and-cases.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/tree-grid/browse-accounts-contacts-and-cases.md">Browse accounts, contacts and cases</a></td></tr></tbody></table>

## Act on rows

Let users pick records or click an action, and hand what they chose to the rest of the flow.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Work with selected rows</strong></td><td>Let an account manager tick accounts in a screen flow Tree Grid, then hand those accounts and their open cases to a colleague after Next.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FLHe8TioIQpYJowEjgtDZ%2Ftree-grid-cover-work-with-selected-rows.png?alt=media">tree-grid-cover-work-with-selected-rows.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/tree-grid/work-with-selected-rows.md">Work with selected rows</a></td></tr><tr><td><strong>Add row and header actions</strong></td><td>Add a row menu and a header button to a screen flow Tree Grid, then log a call, open a record or hand the clicked account to the rest of the flow.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fp8XH6iWPIt5hePDazSX4%2Ftree-grid-cover-add-row-and-header-actions.png?alt=media">tree-grid-cover-add-row-and-header-actions.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/tree-grid/add-row-and-header-actions.md">Add row and header actions</a></td></tr></tbody></table>

Want the full property list? See the [Tree Grid](https://docs.avonnicomponents.com/flow/flow-components/tree-grid.md) reference.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/tutorials/components/tree-grid.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
