No! Or… yes! But… read on… :]
In your model definition class there should be a method public function search(). There you (or Gii, if it auto-generate this file for you) declare a default search behaviour. And there you will find declaration you cited - i.e. CActiveDataProvider(get_class($this). If you use only this searching method (criteria), then in a view file you simply put:
'dataProvider'=>$model->search(),
But if you want to do some more extended search or more deeply modify results presented in CGridView, then you do, what I do.
You create $criteria = new CDbCriteria;, where you declare details about what should be retrieved from DB (and how - including sorting, pagination, etc.). Then you put this criteria to CActiveDataProvider, and in this situation you are using my method of calling, that is:
$dataProvider = new CActiveDataProvider($model, array
(
'criteria'=>$criteria,
'pagination'=>array('pageSize'=>20),
'sort'=>array('defaultOrder'=>array('DATR'=>true)),
));
where $model is model inserted to that view by a controller, taken from a model declaration.
And if you use this approach then you have to tell your CGridView that your data provider is:
'dataProvider'=>$dataProvider,
But this is only a convention. I’m pretty sure that if you would change CActiveDataProvider(get_class($this) with CActiveDataProvider(‘ModelName’ in your ModelName declaration class (ModelName.php in models folder) then everything should work the same way.
In other words, you can say that $model = get_class($this). Because get_class($this) used in Model declaration class only retrieves a model class name, while $model used in a view file is an actual model, that is a data retrieved (by a controller) from database.
At least, that is how I understand this, but I might be missing something.