0

I'm using TbExtendedGridView from Yii Booster. My 'status' column is defined as TbToggleColumn.

array(
        'name'=>'status',
        'class'=>'bootstrap.widgets.TbToggleColumn',
        'toggleAction' => 'Artykul/toggle'
        ),

In my model I have a validation rule that prevents changing the value of 'status' unless some conditions are met. The validation works fine in create / update scenarios BUT it doesn't work - i.e. the condition is not checked - if I click to toggle 'status' in the gridview.

Any idea about how to force TbToggleColumn to use the validation rules defined in the model?

--- edit -

I have now changed in TbToggleAction shipped with Yii Booster:

$success = $model->save(false, array($attribute));

to

$success = $model->save(true, array($attribute));

jantom
  • 21
  • 1
  • 3
  • when it is not working? You said it's working in create/update. Then what else remaining? – Kumar V Dec 14 '13 at 10:13
  • it's not working in 'toggle' Action. I have now changed in TbToggleAction (shipped with Yii Booster): $success = $model->save(false, array($attribute)); to $success = $model->save(true, array($attribute)); – jantom Dec 14 '13 at 13:27
  • So is it working now? confirm.. – Sankalp Singha Dec 14 '13 at 15:27

0 Answers0