Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Cgridview Problem

$
0
0
hi, I'm a newbie to Yii.
I have a problem when I am using CGridView Widget.
On the 'selectionChanged' field,Whenever I tried to click the rows in my table.Nothing happens. Is it should alert the PK value of the row?
<?php 
$this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'pLA_Infogrid',
    'dataProvider'=>$model->search(),
		
	'selectionChanged'=>"function(id){alert($.fn.yiiGridView.getSelection(id));}",
	
	'summaryText'=>'',
    'filter'=>$model,
    'columns'=>array(
        'EmployeeID',
        'UserName',
       // 'Password',
        'LastName',
        'FirstName',
        'MiddleInitial',
        'TimeSheetType',
        'FTE',
        array(
            'class'=>'CButtonColumn',
            'template'=>'{update}{delete}',
            'buttons'=>array
            (
//                 'view' => array
//                 (
//                     'url'=>
//                     'Yii::app()->createUrl("Admin/pLA_Info/view/", 
//                                             array("EmployeeID"=>$data->EmployeeID, "UserName"=>$data->UserName
// 											))',
//                 ),
                'update' => array
                (
                    'url'=>
                    'Yii::app()->createUrl("Admin/pLA_Info/update/", 
                                            array("EmployeeID"=>$data->EmployeeID, "UserName"=>$data->UserName
											))',
                ),
                'delete'=> array
                (
                    'url'=>
                    'Yii::app()->createUrl("Admin/pLA_Info/delete/", 
                                            array("EmployeeID"=>$data->EmployeeID, "UserName"=>$data->UserName
											))',
                ),
            ),
        ),
    ),
		
)); 

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>