![](/img/trans.png)
[英]How to use customCell and Reorder in Kendo react Grid at the same time?
[英]how to reorder row and scroll at same time in kendo grid ui
我已經使用kendo sortable拖放行來重新排序。
JavaScript的:
grid.table.kendoSortable({
filter: ">tbody >tr",
hint: function (element) {
var table = $('<table style="width: 600px;" class="k-grid k-widget"></table>'),
hint;
table.append(element.clone());
table.css("opacity", 0.7);
return table;
},
cursor: "move",
placeholder: function (element) {
return $('<tr colspan="4" class="placeholder"></tr>');
}
,
change: function (e) {
var skip = grid.dataSource.skip(),
oldIndex = e.oldIndex ,
newIndex = e.newIndex ,
data = grid.dataSource.data(),
dataItem = grid.dataSource.getByUid(e.item.data("uid"));
grid.dataSource.remove(dataItem);
grid.dataSource.insert(newIndex, dataItem);
}
});
我不能同時滾動和拖動。 拖動時滾動到工作狀態。 怎么解決?
去年左右,他們添加了一個新設置: autoScroll
可以解決問題。 有關文檔,請參見https://docs.telerik.com/kendo-ui/api/javascript/ui/sortable/configuration/autoscroll 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.