[ 'attribute' => 'active', 'value' => function ($model) { return $model->active == 1 ? 'Yes' : 'No'; }, // 'value' => function ($data){ // return $data->credit==1 ? "On": ($data->credit==2 ? "Pending": "Off"); // } 'filter'=>array("1"=>"Yes","0"=>"No"), // 'filter' => Html::activeDropDownList($searchModel, 'attribute_name', ArrayHelper::map(ModelName::find()->asArray()->all(), 'ID', 'Name'),['class'=>'form-control','prompt' => '']), ],
No comments:
Post a Comment