GridView js error

help me with GridView with search and sort ability …I am also attaching screen shot of js error m catching from app.

My Action :




 public function actionListUsers()

    {

        $this->render('listusers');

    }



My View :




// initialize data provider

        $dataProvider = new CActiveDataProvider('User');

        

        $this->widget('application.extensions.rrview.RRGridView', array(

            'id' => $gridId,

            'dataProvider'=>$dataProvider,

            'columns'=>array(

                'first_name',

                'last_name',

                'username',

                'email',

                'type',

                array(

                    'class'=>'CButtonColumn',

                    'template' => '{edit}{delete}{enable}',

                    'afterDelete'=>'function(link,success,data){ if(success) $("#statusMsg").html(data); }',

                    'deleteConfirmation' => "js:'Are you sure you want to deactivate this account?'",

                    'buttons' => array(

                        'edit' => array(

                            'label' => 'Edit Account',

                            'imageUrl'=>Yii::app()->request->baseUrl.'/images/edituser.png',

                            'url' => 'Yii::app()->createUrl("admin/edituser", array("id"=>$data->id))',

                        ),

                        'delete' => array(

                            'label' => 'Deactivate Account',

                            'imageUrl'=>Yii::app()->request->baseUrl.'/images/deleteuser.png',

                            'url' => 'Yii::app()->createUrl("admin/deactivateaccount", array("id"=>$data->id))',

                            'visible' => '$data->status == "enabled"',

                        ),

                        'enable' => array(

                            'click' => $enableButton,

                            'label' => 'Activate Account',

                            'imageUrl'=>Yii::app()->request->baseUrl.'/images/enableuser.png',

                            'url' => 'Yii::app()->createUrl("admin/activateaccount", array("id"=>$data->id))',

                            'visible' => '$data->status != "enabled"',


                        ),

                    ),

                ),

            ),

            'pager'=>array(

                'cssFile'=>false,

                'header'=>'',

                'firstPageLabel'=>'First Page',

                'lastPageLabel'=> 'Last Page',

                'nextPageLabel'=> 'Next',

                'prevPageLabel'=> 'Previous',

            ),

        ));

        ?>



Thanks in advance

Hi Umer,

Like I can see this is not CGridView widget, this is some extension. It will be also good to ask other users of that extension or creator of extension. Go to extension page and write comment that will point them to this post. Also give us here link to extension page.

Ok its resolved I have used default yii grid view instead of extension.

Thanks for great help

Its good to hear that problem is solved. You are welcome :)

[color="#006400"]/* Moved from Bugs to Yii 1.1 discussion - it’s not a bug in Yii, but in your code… */[/color]