Show data from table


	public function actionIndex()


		// renders the view file 'protected/views/site/index.php'

		// using the default layout 'protected/views/layouts/main.php'

		$rawData=  Student::model()->findAll();


    // or using: $rawData=User::model()->findAll();


                $dataProvider=new CArrayDataProvider($rawData, array(




                        'id', 'name', 'c_id', 'l_id', 'email'




                        'pageSize'=>10,         //records display









/* @var $this SiteController */





        'type'=>'striped bordered condensed',











I have a student model in which student table is there.

But it is not showing data in grid why.

i think i am doing something wrong.

Use attributes names in ‘columns’ array.

hey i want to change the name of attribute like for c_id i want course is it possible with changing the database.

Set the name in model class with attributeLabels method or use details for ‘columns’ array like

'columns' => array(


        'name' => 'c_id',

        'header' => 'Course',