I am trying to enclose the table data of GridView within anchor tag.

<?= GridView::widget([

// is there any property that can be set to achieve this?

    'dataProvider' => $dataProvider,

    'filterModel' => $searchModel,

    'columns' => [


        ['attribute' => 'customer_user_name2',],


]); ?>

The data should be rendered in html page as below

<td> <!-- how to add this? --> <a>data</a> </td>


I am able to achieve this by modifying the $content variable of the class ‘yii\grid\DataColumn’, but not sure if this is the desired way to do.

Can any one explain me?