In Controller
protected function gridCategoryDescription($data,$row)
{
return $this->_lastProductId != $data->id ? $data->discription : '';
}
protected function gridCategoryPrice($data,$row)
{
if($this->_lastProductId != $data->id)
{
$this->_lastProductId = $data->id;
return $data->code;
}
else
return '';
}
protected function gridCategoryDescription($data,$row)
{
return $this->_lastProductId != $data->id ? $data->discription : '';
}
protected function gridCategoryPrice($data,$row)
{
if($this->_lastProductId != $data->id)
{
$this->_lastProductId = $data->id;
return $data->code;
}
else
return '';
}
In view
array(
'name'=>'discription',
'value'=>array($this,'gridCategoryDescription')
),
array(
'name'=>'code',
'value'=>array($this,'gridCategoryPrice')
),
No comments:
Post a Comment