당신을 위해 일을 속도를 내 시도 :
http://jsfiddle.net/5t5c2g1y/2/
var ds1 = new kendo.data.DataSource({
data: createRandomData(500),
scrollable: true,
schema: {
model: {
id: "id",
fields: {
id: {
type: 'number',
editable: true
},
FirstName: {
type: 'string',
editable: true
},
LastName: {
type: 'string',
editable: true
}
}
}
}
});
var ds2 = new kendo.data.DataSource({
data: createRandomData(0),
scrollable: true,
schema: {
model: {
id: "id",
fields: {
id: {
type: 'number',
editable: true
},
FirstName: {
type: 'string',
editable: true
},
LastName: {
type: 'string',
editable: true
}
}
}
}
});
var sourcegrid = $("#usersGrid").kendoGrid({
dataSource: ds1,
editable: "popup",
selectable: "multiple",
pageable: false,
columns: [{
field: "FirstName",
width: 90,
title: "First Name"
}, {
field: "LastName",
width: 90,
title: "Last Name"
}]
}).data("kendoGrid");
var destinationgrid = $("#teamGrid").kendoGrid({
dataSource: ds2,
editable: "popup",
selectable: "multiple",
pageable: false,
columns: [{
field: "FirstName",
width: 90,
title: "First Name"
}, {
field: "LastName",
width: 90,
title: "Last Name"
}]
}).data("kendoGrid");
$('input[type=button]').on('click',function() {
var removalList = [];
sourcegrid.select().each(function() {
var dataItem = sourcegrid.dataItem($(this));
console.log(dataItem);
removalList.push(dataItem)
ds2.add(dataItem);
});
for(var i = 0; i< removalList.length;i++)
{
ds1.remove(removalList[i]);
}
});
당신이 데이터 소스와 상호 작용이 아닌 경우는 그리드 자체에서 프로세스가 훨씬 더 빨라지는 것을 볼 수 있습니다 (g 제거를 확인하라는 팝업 메시지를 제거하십시오.)
정보를 복사 할 수 있도록 콘솔 문을 추가했음을 알 수 있습니다.
다시 도움이 되길 바랍니다.
아마 이것은 http://codereview.stackexchange.com –