Simple GridView extension with jquery ui sortable.
Usage ΒΆ
Add column sort
(intval) to your table.
Add code to your model:
public function behaviors()
{
return array(
'sortable' => array(
'class' => 'ext.sortable.SortableBehavior',
)
);
}
Add code to your controller:
public function actions()
{
return array(
'sortable' => array(
'class' => 'ext.sortable.SortableAction',
'model' => YourModel::model(),
)
);
}
Replace:
$this->widget('CGridView', array(
to:
$this->widget('SortableGridView', array(
Error fix
Hi guys. I fixed some errors into this extension. And add Pull request to author. You can use my report https://github.com/igorska/weee-cms/tree/master/protected/extensions/sortable untill author not approve my bugs fixes
some problem
It's work very well and easy to install, but only on first page of grid view.
I click to next page and it's not work.
I disabled ajaxUpdate in grid view and now it's works in all pages, but now my grid view without ajaxUpdate.
How i can to fix it
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.