> ## 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.

# Formatting

Apply default and conditional formatting to rows and columns in the data grid.

## Row Formatting

Configure row formatting in the tab's **Formatting** section.

**1. Open Formatting**

Open the tab menu, click **Edit**, and select **Formatting**.

You can also open this section from **Formatting** in the data grid menu.

**2. Add Conditions**

Create conditions used by conditional formats.

* In the **Conditions** section, click **New Condition**
* Enter **Condition Name**
* Define condition rules using fields or [formula columns](https://coconut-grid.mintlify.site/visualization/grid/columns.md#add-formula-column)
* Condition rules work like [filters](https://coconut-grid.mintlify.site/visualization/grid/filtering.md)

**3. Set Default Format**

Set the default style for rows.

* In the **Default Format** section, set **Foreground Color**
* Set **Background Color**
* The default is no color

**4. Add Conditional Formats**

Add formats that apply when conditions match.

* In the **Conditional Formats** section, click **Add Conditional Format**
* Select a condition
* Set **Foreground Color**
* Set **Background Color**
* Check the preview box

**5. Reorder Conditional Formats**

Change the priority of conditional formats.

* Drag the drag icon to reorder formats
* The first matching rule is applied

**6. Save**

Save the format settings.

* Click **Save**
* Formatting is applied to the data grid

## Column Formatting

Open column format dialog from the column menu.

**1. Open Edit Column Dialog**

Open the column menu and click **Edit**.

The Edit Column dialog opens.

**2. Open Format Tab**

Click the **Format** tab.

Column format settings are displayed.

**3. Configure Format**

Configure conditions, default format, and conditional formats.

The settings are the same as row format, but apply only to the selected column.

**4. Save**

Save the column format settings.

* Click **Save**
* Formatting is applied to the selected column

## Color Selection

Choose colors for foreground and background.

**1. Open Color Selector**

Click **Foreground Color** or **Background Color**.

The color palette dialog opens.

**2. Select a Color**

Select a color.

* Choose from predefined colors
* Enter a custom color
* Use the color picker

> [!TIP]
>
> Conditional formats are applied using the first matching rule. Reorder rules to control priority.


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