我这样写的不行
function moveTop() {
var pageData = datagrid1.getData();
var firstRow = pageData[0];
var rows = datagrid1.getSelecteds();
datagrid1.moveRow(rows, firstRow._uid);
}
function moveBottom() {
var pageData = datagrid1.getData();
var lastRow = pageData[pageData.length - 1];
var rows = datagrid1.getSelecteds();
datagrid1.moveRow(rows, lastRow._uid);
}
作者: felt 时间: 2021-3-15 09:21:27
moveRow是移动单行的API
var row = grid.getSelected();
grid.moveRow(row, 0);
var lastRow=grid.getData()[grid.getData().length-1];
var lastIndex=grid.indexOf(lastRow);
grid.moveRow(row,lastIndex+1);作者: zghkbl 时间: 2021-3-18 21:28:52