# PanelGrid

> Builds the DataView grid with the layout, table, and empty-cell conventions shared by every debug panel.

[API reference](/docs/api/index.md) › [Yii3 Debug](/docs/extensions/yii3-debug/reference/index.md) › [Web](/docs/extensions/yii3-debug/reference/web/index.md) › PanelGrid

| final class | `Yii3\Debug\Web\PanelGrid` |
| --- | --- |
| Source | [`src/Web/PanelGrid.php`](https://github.com/yii3/debug/blob/main/src/Web/PanelGrid.php#L17) |

Builds the DataView grid with the layout, table, and empty-cell conventions shared by every debug panel.

The grid creates no application URLs: the debugger serves its pages from its own middleware, outside the router, so
an application widget theme binding `GridView` to a router-aware URL creator must not reach the debug panels. A
panel that needs real page links applies its own `urlCreator()` afterwards.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`create()`](#method-create) static | Returns the grid rendering only its items, keeping the column classes on body cells that resolve to no content and letting DataView add the accessibility attributes of the table. | `PanelGrid` |
| [`filterable()`](#method-filterable) static | Returns the grid of [`create()`](/docs/extensions/yii3-debug/reference/web/panelgrid/index.md#method-create) with the filter row wired to the hidden form that submits the controls. | `PanelGrid` |

## Method details

### create() <span id="method-create"></span>

```php
public static function create(Yiisoft\Data\Reader\ReadableDataInterface<array-key, Yii3\Debug\Web\TRow> $dataReader): Yiisoft\Yii\DataView\GridView\GridView<Yii3\Debug\Web\TRow>
```

Returns the grid rendering only its items, keeping the column classes on body cells that resolve to no content
and letting DataView add the accessibility attributes of the table.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$dataReader` | `Yiisoft\Data\Reader\ReadableDataInterface<array-key, Yii3\Debug\Web\TRow>` | Rows the grid renders. |

**Returns**

`Yiisoft\Yii\DataView\GridView\GridView<Yii3\Debug\Web\TRow>`: Grid carrying the shared panel configuration.

### filterable() <span id="method-filterable"></span>

```php
public static function filterable(Yiisoft\Data\Reader\ReadableDataInterface<array-key, Yii3\Debug\Web\TRow> $dataReader, string $formId): Yiisoft\Yii\DataView\GridView\GridView<Yii3\Debug\Web\TRow>
```

Returns the grid of [`create()`](/docs/extensions/yii3-debug/reference/web/panelgrid/index.md#method-create) with the filter row wired to the hidden form that submits the controls.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$dataReader` | `Yiisoft\Data\Reader\ReadableDataInterface<array-key, Yii3\Debug\Web\TRow>` | Rows the grid renders. |
| `$formId` | `string` | Identifier of the hidden form the filter controls submit. |

**Returns**

`Yiisoft\Yii\DataView\GridView\GridView<Yii3\Debug\Web\TRow>`: Grid carrying the shared panel and filter row configuration.