DataColumn
The dataColumn tag represents a DataColumn. It is used within the gridView tag.
Parameters
The dataColumn tag has the same parameters as DataColumn, and they are specified in the same way, i.e. in order and/or as named parameters, and accept the same types.
Usage
The gridView tag encloses xColumn tags.
{varType Yiisoft\Data\Reader\ReadableDataInterface $dataReader}
{gridView $dataReader|header: 'Users'}
{serialColumn}
{dataColumn 'id'}
{dataColumn 'username'}
{dataColumn 'email'}
{dataColumn 'created_at'}
{checkboxColumn}
{radioColumn}
{actionColumn}
{actionButton 'view', 'View'}
{actionButton 'update', 'Edit'}
{actionButton content: 'Delete', name: 'delete}
{/actionColumn}
{/gridView}
Last modified: 17 May 2025