No Results Fond On My Gridview Even Though There Is Datas

on my BaseSiReceivedItem model





	public function relations()	{

		// NOTE: you may need to adjust the relation name and the related

		// class name for the relations automatically generated below.		

		return array(

			'details' => array(self::BELONGS_TO, 'BaseRefSiDetails', 'details_id'),

		);

	}






on my grid




<?php	

	$this->widget('ext.bmenu.XBatchMenu', array(

	    'formId'=>'base-si-received-item-form',

	    'checkBoxId'=>'base-si-received-item-id',

	    'ajaxUpdate'=>'base-si-received-item-grid', // if you want to update grid by ajax

	    'emptyText'=>Yii::t('ui','Please check items you would like to perform this action on!'),

	    'confirm'=>Yii::t('ui','Are you sure to perform this action on checked items?'),

	    'items'=>array(

	        array('label'=>Yii::t('ui','Delete'), 'url'=>array("deleteBatch"),'linkOptions'=>array('class'=>'action-button')),

	        //array('label'=>Yii::t('ui','Approve'),'url'=>array("#"),'linkOptions'=>array('class'=>'action-button left')),

	        //array('label'=>Yii::t('ui','Disapprove'),'url'=>array("#"),'linkOptions'=>array('class'=>'action-button right')),

	        array('label'=>Yii::t('ui','Activate'),'url'=>array("activateBatch"),'linkOptions'=>array('class'=>'action-button left')),

	        array('label'=>Yii::t('ui','Deactivate'),'url'=>array("deactivateBatch"),'linkOptions'=>array('class'=>'action-button right')),

	        array('label'=>Yii::t('ui','Download as PDF'), 'url'=>array("downloadBatchPdf"),'linkOptions'=>array('class'=>'action-button')),

	        array('label'=>Yii::t('ui','Download as Excel'), 'url'=>array("downloadBatchXls"),'linkOptions'=>array('class'=>'action-button')),

	    ),

	    'htmlOptions'=>array('class'=>'actionBar'),

	));

?>	


<?php echo CHtml::beginForm('','post',array('id'=>'base-si-received-item-form'));?><?php 

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

		'id'=>'base-si-received-item-grid',

		'dataProvider'=>$searchModel->search(),

		//'filter'=>$searchModel,

		'columns'=>array(		

			array(

				'class'=>'CCheckBoxColumn',

			    'id'=>'base-si-received-item-id',		

    			'selectableRows'=>2, // multiple rows can be selected	    

    		),

    		array(

				'name' => 'details.detail_id',

				'header'=>'id',

				'value' => '$data->details->details_id',

			),		

			array(

				'name' => 'details.stockno',

				'header'=>'Stock No',

				'value' => '$data->details->stockno',

			),

			/*array(

				'name' => 'details.details_description_search',

				'header'=>'Description',

				'value' => '$data->details->details_description_search',

			),






my problem is my gridview always No results found. even though there is datas on my related model . is ther something wrong on my codes ?

Hi,

you must check your search function in model too.

For debug, you can modify a line in search, then you will see the SQL request.