在yii中显示已删除的项目

I am using codes where the deleted items are set to 1 instead of completely wiping it out(for the records sake). My question is that is anyway to separate files that have been set to 1 from the ones that are still not deleted? It is my first time using Yii so I wanted some idea on what is the best way to do this?

You could copy 'deleted' items in a historical table and really delete them from primary table.

I don't see other operations about them.

You could create another search (with different name of course) function in model and call this function in your grid view:

'dataProvider'=>$model->deletedSearch(),

And in the deletedSearch function in model:

public function deletedSearch()
    {

        $criteria=new CDbCriteria;

        $criteria->compare('id',$this->id);
        ....
        $criteria->addCondition("is_deleted = 1");

        return new CActiveDataProvider($this, array(
            'criteria'=>$criteria,
        ));
    }

Thats it. Hope that helps :)