Jquery Sortable In Clistview View

Hi I got this type of view going

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

   // 'isd' => 'my-grid',

    'dataProvider' =>$dataProvider,

	'itemView'=> 'admin_cat',






and inside admin_cat is


  $(document).ready(function() {




<ul id="sort">


	<?php echo CHtml::image(Yii::app()->baseUrl.'/images/icons/folder.png',  'alt',array('width'=>16,'height'=>16)); ?>

	 <?php echo CHtml::link("{$data->Name}",  array('category/update', 'id'=>$data->ID)); ?> 

     <?php echo CHtml::link("{$data->items}",  array('view', 'id'=>$data->ID)); ?>








SO that only moves the 1st row and the rest are ineffective. If I do $(“ul”).sortable(); I can drag each row but it doesn’t place. Basically I can drag but not drop…

Here’s what I gathered, it’s not taking them as 1 UL element because the view itself is looping. So it treats every row as it’s own ul. Anyone have any ideas how I can work this?

Dear ItsYII

I presume that you need every item in the CListView sortable.

I hope the following code can do it.

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



)); ?>








Yes that’s done it, thanks. So I’m assuming every time I want to add a jquery action on Clistview I should do it as so Yii::app()->clientSCript->registerSCript(…);