> ## Documentation Index
> Fetch the complete documentation index at: https://coconut-grid.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up a Related Grid

Create a Grid or Related Grid in the item before adding a Related Grid that uses it as its source.

## Create a Related Grid

**1. Add a Related Grid Tab**

Click **New Tab** and select **Related Grid**.

**2. Choose a Relation Type**

Choose **Standard** or **Custom** for **Relation Type**.

**3. Choose a Source Tab**

Select a **Source Tab** from the current item.

**4. Configure Source Records**

Choose the **Source Key** and **Source Rows**. For a standard relationship, the source key is `Id`.

**5. Choose the Related Object**

Select the **Related Object**. Enable **Show All Objects** to expand the list of available objects.

**6. Configure the Relationship**

Choose the **Related Key** and **Match Type**.

**7. Name and Save the Tab**

Enter the **Tab Name** and click **Save**.

For a standard relationship, available related objects and keys come from the source object's Salesforce relationships. For a custom relationship, available related keys have a type compatible with the source key.

See [Choose Source Rows](https://coconut-grid.mintlify.site/visualization/related-grid/overview.md#choose-source-rows) and [Choose a Match Type](https://coconut-grid.mintlify.site/visualization/related-grid/overview.md#choose-a-match-type) for the available options.

## Example: Contacts for an Account

Start with an Accounts Grid, then create a Related Grid with these settings:

| Setting | Value |
| - | - |
| **Relation Type** | **Standard** |
| **Source Tab** | Your Accounts Grid |
| **Source Key** | `Id` |
| **Source Rows** | **Focused Row** |
| **Related Object** | Contact |
| **Related Key** | `AccountId` |
| **Match Type** | **Matching** |

Focus a saved account row to display its contacts. Use an [item layout](https://coconut-grid.mintlify.site/visualization/items.md#item-layouts) to keep both grids visible.

## Edit the Relationship

Open the tab menu, click **Edit**, and select **Relationship**. Update the source tab, keys, source rows, or match type, then click **Save**.

The related object is read-only after creation. Create a new Related Grid to use a different related object. A tab cannot use itself as its source, and related tabs cannot form a circular dependency.

Use the other settings sections to configure [columns](https://coconut-grid.mintlify.site/visualization/grid/columns.md), [filters](https://coconut-grid.mintlify.site/visualization/grid/filtering.md), [search](https://coconut-grid.mintlify.site/visualization/grid/searching.md), [sorting](https://coconut-grid.mintlify.site/visualization/grid/sorting.md), [formatting](https://coconut-grid.mintlify.site/visualization/grid/format.md), and [actions](https://coconut-grid.mintlify.site/actions/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.