Yii Cgridview Update Button Open A Modal Window

I’m trying to update Yii CGridView record in modal widow,I added a button in CButtoncolumn.



        'htmlOptions' => array('style'=>'width:76px;'),             






                            'label'=>'Update Board',



                                            $.fn.yiiGridView.update('boards-grid', {  //change my-grid to your grid's name



                                                success:function(data) {

                                                      $.fn.yiiGridView.update('boards-grid'); //change my-grid to your grid's name



                                            return false;




                     ), //updateboard

                ) // buttons


but it is not opening a model window,is there a better solution to update my cgridview record in modal window.

This is my controller code

  public function actionUpdate($id)



    // Uncomment the following line if AJAX validation is needed

    // $this->performAjaxValidation($model);





            return true;



I was looking for this too. Now I found a solution on this wiki.

I think you need to change ‘boards-grid’ to ‘#boards-grid

If you want to use CJuiDialog:

  • Wiki article

  • extension quickdlgs

If you want CJuiDialog in bootstrap style, there exists jQuery UI themes.