> For the complete documentation index, see [llms.txt](https://boxlang.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boxlang.ortusbooks.com/boxlang-framework/modularity/ui-compatibility/reference/components/gridcolumn.md).

# GridColumn

Defines a column in a data grid component.

## Syntax

```boxlang
<bx:gridcolumn 
    name="string"
    header="string"
    width="string"
    sortable="boolean"
    editable="boolean"
    dataAlign="string"
    headerAlign="string"
    display="boolean"
    type="string"
    numberFormat="string"
    dateFormat="string"
    values="string"
    valuesDisplay="string"
    href="string"
    target="string" />
```

## Attributes

| Attribute       | Type      | Required | Description                                                                                                | Default  |
| --------------- | --------- | -------- | ---------------------------------------------------------------------------------------------------------- | -------- |
| `name`          | `string`  | Yes      | Column data field name                                                                                     |          |
| `header`        | `string`  | No       | Column header text                                                                                         | `name`   |
| `width`         | `string`  | No       | Column width (CSS value)                                                                                   |          |
| `sortable`      | `boolean` | No       | Enable sorting for this column                                                                             | `true`   |
| `editable`      | `boolean` | No       | Enable editing for this column                                                                             | `false`  |
| `dataAlign`     | `string`  | No       | Data alignment: `left`, `center`, `right`                                                                  | `left`   |
| `headerAlign`   | `string`  | No       | Header alignment: `left`, `center`, `right`                                                                | `left`   |
| `display`       | `boolean` | No       | Whether to display this column                                                                             | `true`   |
| `type`          | `string`  | No       | Data type: `string`, `html`, `numeric`, `date`, `boolean`. If `html`, the content will not be HTML-encoded | `string` |
| `numberFormat`  | `string`  | No       | Number format mask for numeric columns                                                                     |          |
| `dateFormat`    | `string`  | No       | Date format mask for date columns                                                                          |          |
| `values`        | `string`  | No       | Comma-delimited list of values for dropdown editing                                                        |          |
| `valuesDisplay` | `string`  | No       | Display values corresponding to `values` list                                                              |          |
| `href`          | `string`  | No       | URL pattern for making column data into links                                                              |          |
| `target`        | `string`  | No       | Link target (`_blank`, `_self`, etc.)                                                                      |          |

## Usage Notes

* Must be used within a `<bx:grid>` component
* The `name` attribute should match a field in the grid's query data

## Related Components

* [Grid](/boxlang-framework/modularity/ui-compatibility/reference/components/grid.md) - Parent grid component
* [GridRow](/boxlang-framework/modularity/ui-compatibility/reference/components/gridrow.md) - Grid row component


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-framework/modularity/ui-compatibility/reference/components/gridcolumn.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
