How to open a Modal from button (GridView)

Hello, I have a GridView, so I want to open a Modal (with data from GridView) when you on clic in a ButtonColumn.

My GridView is:


 $this->widget('booster.widgets.TbGridView', array(

                    'id' => 'dispositivo-grid-list',

                    'dataProvider' => $histoasignacion->search(),

                    'filter' => $histoasignacion,

                    'columns' => array(                        

                        array(

                            'name' => 'id_dis',

                            'header'=>'Dispositivo',

                                                        

                        ),

                        array(

                            'name' => 'fecha_modif',

                            'header'=>'Fecha de Modificacion'

                        ),

                        array(

                            'name' => 'observacion',

                            'header'=>'Obervaciones'

                        ),

                         array(

                            'class' => 'booster.widgets.TbButtonColumn',

                            'htmlOptions' => array('width' => '10'), //ancho de la columna

                            'template' => '{delete} {update}', // botones a mostrar

                            'buttons' => array(

                                "delete" => array(

                                    'label' => 'Eliminar',                             

                                    'click' => 'function(){return confirm("Desea eliminar todos los registro del dispositivo?");}',

                                    'url'=> 'Yii::app()->createUrl("/Dispositivo/Eliminar?id=$data->id_dis")'

                                ),

                                "update" => array(

                                    'label' => 'Modificar',                                     

                                ),

                            ),

                        ),                        

                    ),                    

                ));                

            ?> 

when I clic on "Update", I want to open a Modal.

Thanks people.!!!

In the view (cgridview params):




    ............

    'columns' => array(

        ............

        array(

            'class' => 'CButtonColumn',

            'header' => 'Actions',

            'template' => '{update} {delete}',

            'buttons' => array(

                'update' => array(

                    'label' => 'Update record',

                    'url' => '$this->grid->controller->createUrl("update", array("id"=>$data->primaryKey))',

                    'click' => 'function(){$("#parm-frame").attr("src",$(this).attr("href")); $("#parmdialog").dialog("open"); return false;}',

                ),

       ............



And, after the grid definition




$this->beginWidget('zii.widgets.jui.CJuiDialog', array(

    'id' => 'parmdialog',

    'options' => array(

        'title' => 'Update record',

        'autoOpen' => false,

        'modal' => true,

        'width' => 600,

        'height' => 400,

    ),

));

echo '<iframe id="parm-frame" width="100%" height="100%"></iframe>';

$this->endWidget('zii.widgets.jui.CJuiDialog');



The controller is very simple




    public function actionUpdate($id) {

        $this->render('_form', array(

            'model' => $this->loadModel($id),

        ));

    }



The "_form" view contains the HTML code to be rendered in the modal.

Hope this is useful.

Thanks very very much! :)