【发布时间】:2014-10-01 04:28:36
【问题描述】:
我正在使用下面的链接对 CGridview 行进行排序,
http://www.yiiframework.com/wiki/238/creating-a-jqueryui-sortable-cgridview/
它工作正常,但网格更新后我无法拖动网格行!
我的代码,
$('#basefilter-grid table').sortable({
forcePlaceholderSize: true,
forceHelperSize: true,
items: 'tr',
update : function () {
serial = $('#basefilter-grid table').sortable('serialize', {key: 'order[]', attribute: 'class'});
$.ajax({
'url': '" . $this->createUrl('baseContact/orderFilterRow') . "',
'type': 'post',
'data': serial,
'success': function(data){
$.fn.yiiGridView.update('basefilter-grid');
},
'error': function(request, status, error){
alert('We are unable to set the sort order at this time. Please try again in a few minutes.');
}
});
},
helper: fixHelper
}).disableSelection();
在行拖动后我有列'order'被更新,在网格刷新后只会看到更新的值,所以我需要严重更新网格,有人能说怎么做吗?
【问题讨论】:
-
您的浏览器控制台日志中是否有任何错误?
-
没有错误,只是我不能在网格更新后拖动网格行!! !
标签: php yii jquery-ui-sortable cgridview