How To Customize Delete Confirmation Prompt ?

I need to customize the delete confirmation prompt from an CActiveGrid, because I need to warn user that deleting a record will delete related record too.

The scenario is: one causalType deleted is setted isActive=0, and all of causals with its causalTypeId will be also setted with isActive = 0.

Is there a way to customize the prompt ?

Is there eventually a way to change the prompt based on a cell value ?

I’m looking at this:

With this, I can customize prompt, for whole table, but not for single row.

Assuming you’re using CButtonColumn:

For the message you can set deleteConfirmation -

As for the dinamic message check this thread -

I read both link, but…

I need something like :

if (year >2009) then

confirmation = ‘Do you really want to delete this’ ?


confirmation = 'It’s discouraged to delete data older than 3 years … "

[it’s just an example]

How to ?