使用 Kartik Gridview,我在我的视图(Kartik Gridview)中有以下 ExpandRowColumn,其中我启用了使用 enableRowClick 选项单击和展开网格中的行(以显示相关的详细记录),并希望隐藏整个展开/折叠图标行并仅使用行点击功能。我尝试设置“禁用”选项,但这只会使 ExpandRowColumn 完全禁用。
[
'class' => 'kartik\grid\ExpandRowColumn',
'width' => '50px',
'value' => function ($model, $key, $index, $column) {
return GridView::ROW_COLLAPSED;
},
'detail' => function ($model, $key, $index, $column) {
return Yii::$app->controller->renderPartial('_example', ['model' => $model]);
},
'headerOptions' => ['class' => 'kartik-sheet-style'],
'expandOneOnly' => true,
'enableRowClick' => true,
],