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:

http://www.yiiframework.com/wiki/106/using-cbuttoncolumn-to-customize-buttons-in-cgridview/

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

Assuming you’re using CButtonColumn:

http://www.yiiframework.com/doc/api/1.1/CButtonColumn#deleteConfirmation-detail

For the message you can set deleteConfirmation - http://www.yiiframework.com/doc/api/1.1/CButtonColumn#deleteConfirmation-detail

As for the dinamic message check this thread - http://www.yiiframework.com/forum/index.php/topic/13804-

I read both link, but…

I need something like :

if (year >2009) then

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

else

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

[it’s just an example]

How to ?