What is the correct way to do a row by row css expression. In Yii 1 is was rowCssClass. I couldn't figure out how to achieve this with Yii2. I had tried this, but wasn't sure I was on the right lines:
'rowOptions' => function($model, $key, $index, $grid){ if($data->option->correct_answer == 1){ return ['class' => 'danger']; } }, I'm unsure where to get the parameters for the function from when dealing with the dataProvider though.