Problems with expand row

Web Tips Q & ACategory: Krajee Yii2 ExtensionsProblems with expand row
gilbertoteles asked 12 months ago

Hi,

When i click on button to expand a row nothing happens. The data is there, but click not working…
module was set on config/main.php
here is my code
<?=
GridView::widget([
‘id’ => ‘gridpesquisa’,
‘dataProvider’ => $pesquisarealizada,
//’filterModel’ => $searchModel,
‘columns’ => [
[
‘class’ => ‘kartik\grid\SerialColumn’,
‘contentOptions’ => [‘class’ => ‘kartik-sheet-style’],
‘width’ => ’36px’,
‘header’ => ”,
‘headerOptions’ => [‘class’ => ‘kartik-sheet-style’]
],
[
‘class’ => ‘kartik\grid\ExpandRowColumn’,
‘width’ => ’50px’,
‘value’ => function ($model, $key, $index, $column) {
return GridView::ROW_COLLAPSED;
},
‘detail’ => function ($model, $key, $index, $column) {
$searchModel = new RespostasSearch;
$searchModel->control_idcontrol = $model[‘idcontrol’];
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
error_log(print_r($model, true));
return Yii::$app->controller->renderPartial(‘_respostascontrol’, [
‘searchModel’ => $searchModel,
‘dataProvider’ => $dataProvider,
]);
},
‘headerOptions’ => [‘class’ => ‘kartik-sheet-style’],
‘expandOneOnly’ => true
],
//’idcontrol’,
‘data:datetime:Data da pesquisa’,
‘dealer’,
],
‘toolbar’ => [
‘{export}’,
‘{toggleData}’
],
‘pjax’ => true,
‘bordered’ => true,
‘striped’ => true,
‘condensed’ => false,
‘responsive’ => true,
‘hover’ => true,
‘floatHeader’ => true,
//’floatHeaderOptions’ => [‘scrollingTop’ => 50],
//’bootstrap’ => true,
//’showPageSummary’ => true,
‘panel’ => [
‘type’ => GridView::TYPE_PRIMARY
],
]);
?>

 

Login or register to contribute or comment.

Login   Register