Cgridview Column Link Not Working

Code I used in CGridView gives me a null value in $data->gen_id and $data->erc_gen at the column value, when I inspect with the browser inspector it gives me

<a href="/ekportal/erc/index.php?r=ercGen/update&id="></a>

See Code at ercgen/admin code hereunder:

    $qryTmp = 

		"SELECT gen_id, erc_ref,B.complete_name sales_executive,C.description type,D.client_name client_id,event_name, E.status_desc erc_status ".

		"FROM erc_gen A, Users B, erc_type C, clients D, erc_status E ".

		"WHERE A.sales_executive = b.user_id ".

		"AND A.type = C.typ_no ".

		"AND A.client_id = D.client_id ".

		"AND A.erc_status = ".

		"AND sales_executive = '$user_id' ".

		"AND erc_status = '1' ";

    $count = Yii::app()->db->createCommand('SELECT COUNT(*) FROM ('.$qryTmp.') X')->queryScalar();

    $dataProvider=new CSqlDataProvider($qryTmp, array(




			 'gen_id','erc_ref', 'sales_executive', 'type','client_id','event_name','erc_status'








    $this->widget('zii.widgets.grid.CGridView', array(












    		'value'=>'$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)',



    		'header'=>'Reference Number',







I have found the answer here.