enableSorting no work with criteria 'order'


I have a problem with CListView, if I set ‘order’ in the criteria of CActiveDataProvider, enableSorting no work in widget. I see the link on the web, but no sorting. If I remove the criteria ‘order’, sorting work perfect. The code:

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



			'order'=>'fecha DESC',


And the widget:

		<?php $this->widget('zii.widgets.CListView', array(








			'template'=>'{sorter} {items} {pager}',

		)); ?>

Any suggestion?


Hi again,

I found a solution. In CActiveDataProvider instead of set ‘order’ in ‘criteria’, I had set,






In this way, sorting works fine in CListView and the list of items appear sorted on the web with the criteria you want.