yii – Kartik Grid可编辑列,不适用expandrow样式

前端之家收集整理的这篇文章主要介绍了yii – Kartik Grid可编辑列,不适用expandrow样式前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我使用pjax拉入kartik可扩展行网格时,未应用editablecolumn样式.如何将css应用于此列?
  1. <?PHP echo GridView::widget([
  2. 'dataProvider' => $dataProvider,'filterModel' => $searchModel,'pjax' => false,'columns' => [
  3. [
  4. 'class' => 'kartik\grid\ExpandRowColumn','value' => function ($model,$key,$index,$column){
  5. return GridView::ROW_COLLAPSED;
  6. },'detailUrl' => 'index.PHP?r=controller/detail'
  7. ],

扩展视图

  1. <?PHP echo GridView::widget([
  2. 'dataProvider' => $dataProvider,'pjax'=> true,'columns' => [
  3. [
  4. 'attribute' => 'brand_name','value' => function($model,$idx,$col){
  5. return $model['brand_name'];
  6. },],[
  7. 'class'=>'kartik\grid\EditableColumn','hAlign'=>'center','vAlign'=>'middle',$col){
  8. return 100;
  9. },'editableOptions' => [
  10. 'name' => 'Test','header' => 'Test22','inputType' => Editable::INPUT_TEXT,'formOptions' => ['action' => ['/book/editbook']],'options' => [
  11. 'convertFormat'=>true,'pluginOptions' => ['format' => 'PHP:Y-m-d']
  12. ]
  13. ]
  14. ],
也许您应该尝试使用editableOptions中的containerOptions或contentOptions属性设置HTML.

猜你在找的PHP相关文章