i want to set condition for deleteConfirmation value in CGridView but its not work, why?
this mycode :
'deleteConfirmation'=>$data->Status == "0" ? "sure change status to notactive?" : "sure change status to active?",
You can’t use $data here as this message is only set once for the whole grid and not when looping over the rows. So you have to think about a custom solution.
My try would be: Use cssClassExpression to add active to the cell class when $data->Status!=0 and use a one liner jQuery for your custom confirmation that checks for that class.
this message is only set once for the whole grid and not when looping over the rows
oh i see,
thank u mike