Hi all
I’m completely new to yii framework and i’ve been trying to display a gridview row data in a jquery ui dialog to no avail, so far i have this code but i don’t know how to call the dialog or what is the correct approach to get this done:
<?php \yii\widgets\Pjax::begin(); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'code',
'name',
[
'class' => 'yii\grid\DataColumn',
'attribute' => 'population',
'label' => 'Population',
'enableSorting' => true,
//'encodeLabel' => true,
'format' => 'raw',
'value' => function($data){
return $data->population;
}
],
'capital',
['class' => 'yii\grid\ActionColumn',
'template' => '{view}',
'buttons' => [
'view' => function($url, $model) {
//How to call the dialog from here ?...
}
]
],
],
'layout' => '{summary}{items}{errors}{pager}',
]); ?>
<?php \yii\widgets\Pjax::end(); ?>
<?php Dialog::begin([
'id'=>'dialogo',
'clientOptions' => [
'autoOpen' => false,
'modal' => true,
'resizable' => false,
],
]);
echo 'Data should be here...';
Dialog::end();?>
I’d appreciate if you point me in the right direction to accomplish this since i’ve been surfing the web and couldn’t find any example related in yii 2.0
Thanks in advance