0
i erstellen gridview in Yü 2 wie unten:Arbeit mit HTML :: Taste in Yü 2
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\ActionColumn'],
['class' => 'kartik\grid\SerialColumn'],
['class' => 'kartik\grid\CheckboxColumn'],
'id',
'countrydate',
'countryCode'=>[
'attribute'=>'countryCode',
'content' => function($model,$key,$index, $column) {
return Html::button($model->countryCode,$options = [
'onclick'=>'showcountryCode('.$key.')',
'id'=>'countryCode'.$key,
'class'=>'popup',
]);
}
],
'countryName',
'countrydate',
'population',
'fipsCode',
],
und ich verwende meine cutson Einstellung für
'countryCode'=>[
'attribute'=>'countryCode',
'content' => function($model,$key,$index, $column) {
return Html::button($model->countryCode,$options = [
'onclick'=>'showcountryCode('.$key.')',
'id'=>'countryCode'.$key,
'class'=>'popup',
]);
}
],
wissen Sie, wir Tags innerhalb haben einander in HTML wie folgt aus:
<a> <h1> asdas </h1> </a>
jetzt will ich innerhalb Html::button
einen anderen Tag legen, wie soll ich das tun?