> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/es/portal/portal-widgets/tables.md).

# Tablas

Las tablas pueden utilizarse para mostrar datos a los usuarios en formato de cuadrícula.

## Tabla básica

Las tablas constan de una fuente de datos y una serie de columnas. Puede usar variables de PowerShell como fuente de datos. Un script sencillo podría cargar todos los servicios de la máquina en una variable.

```powershell
$Variables["Services"] = Get-Service
```

La tabla mostraría entonces un número determinado de propiedades como columnas.

```markup
<Table DataSource="$Services">
    <PropertyColumn Property="Name"></PropertyColumn>
    <PropertyColumn Property="Status"></PropertyColumn>
</Table>
```

## Contenido de las columnas

Las columnas de propiedades pueden proporcionar contenido personalizado en función de la fila que se esté representando. Utilice la variable `$Context` para hacer referencia a la fila actual.

```markup
<Table DataSource="$Services">
    <PropertyColumn Property="Name"></PropertyColumn>
    <PropertyColumn Property="Status">
        <Alert Message="$context.Status" />
    </PropertyColumn>
</Table>
```

## Columnas de acciones

Las columnas de acciones no están vinculadas a una propiedad concreta y se utilizan para mostrar acciones como botones.

```markup
<Table DataSource="$Services">
    <PropertyColumn Property="Name"></PropertyColumn>
    <PropertyColumn Property="Status">
        <Alert Message="$context.Status" />
    </PropertyColumn>
    <ActionColumn>
        <Button OnClick="ShowStatus">Show Status</Button>
    </ActionColumn>
</Table>
```

Para hacer referencia a la fila actual en el clic del botón, utilice el parámetro `$Context`.

```powershell
function ShowStatus {
    param($Context)
    $Message.Success($Context.Status.ToString())
}
```


---

# 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://docs.devolutions.net/powershell-universal/es/portal/portal-widgets/tables.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.
