cgridview and database access objs

how do we allow searching/filtering of cgridview data when we are using database objects instead of active record? I want people to be able to sort and search data listed in the cgridview table.

http://www.yiiframework.com/doc/api/1.1/CArrayDataProvider