Pagination not working on CActiveDataProvider when setting data

I discovered that if you set data in a CActiveDataProvider like this, the pagination doesn’t work:

		$dataProvider = new CActiveDataProvider('Post',array(

		     'data' => Post::model()->findAll(),


Yii: 1.1.x

Can you help me with tabular input??? i’m new to yii and i want to learn about that. thanks to you :) hope you will help me.

CActiveDataProvider wasn’t designed to work with pre-populated data. There’s a dedicated data provider class for that.

I didn’t know about the CArrayDataProvider class. However, I tried this class but I get a strange error when using the data provider in a CListView:

array_slice() expects parameter 1 to be array, boolean given

I don’t know what this means.

iwant to dislay the database content in the view wherein one column represented by a textfield who’s name is Duration. this textfield should be an array and i want to validate it in model. plssss help me with this… thanks