我是yii2的新手。我试图将GridView的表数据括在锚标记中。
<?= GridView::widget([
// is there any property that can be set to achieve this?
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class'=>'yii\grid\SerialColumn'],
['attribute' => 'customer_user_name2',],
],
]); ?>
数据应该在html页面中呈现,如下所示
<td> <!-- how to add this? --> <a>data</a> </td>
感谢。
答案 0 :(得分:0)
我相信他会帮助你: http://www.bsourcecode.com/yiiframework2/gridview-in-yiiframework-2-0/#gridview-table-options 如何在Gridview中添加table和tableRow。