Answer the question
In order to leave comments, you need to log in
All data is not displayed through CGridView, how does it display all data?
There is this code:
$this->widget('zii.widgets.grid.CGridView', array(
'id' => 'addressesListGrid',
'dataProvider' => $addresses->search(),
'template' => '{items}',
'itemsCssClass' => 'table',
'columns' => array(
'user_id',
'street',
'home',
'main',
),
));
...
'dataProvider' => $addresses->search(),
'filter' => false,
...
...
'columns' => array(
'user_id',
'street',
'home',
array(
'name' => 'main',
'filter' => false,
),
),
...
public function search()
{
$criteria = new CDbCriteria;
$criteria->compare('id', $this->id);
$criteria->compare('user_id', $this->user_id);
$criteria->compare('area_id', $this->area_id);
$criteria->compare('zone_id', $this->zone_id);
$criteria->compare('street', $this->street);
$criteria->compare('home', $this->home);
$criteria->compare('main', $this->main);
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
));
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question