あなたは正確にリンクされ、質問/答えで説明したように重複する行を追加していると仮定すると...
私はグリッドを編集可能にするとき、私はそのエラーを取得しない:真。セットアップとエラーを示すコードサンプルを提供する必要があります。
今、私はリンクされた答えを取ってそれからDojoを作成し、グリッドを編集可能にして重複行を正常に編集しました。
http://dojo.telerik.com/@Stephen/EHeFU
わずかな変化がそれらのないよう適切に動作するために編集を取得するためになされなければならなかったあなたがについて何かをしない限り、彼らは同じ識別子を持っているので、重複したデータ項目を編集することも、元のデータ項目に変更を加えますそれ、すなわち:
$("#duplicate").on("click", function() {
var items = [];
$(":checked", grid.tbody).each(function(idx, elem) {
var row = $(elem).closest("tr");
// Must duplicate the raw data only using toJSON(), otherwise the duplicated item will have the same identifier(uid) as the original.
var item = grid.dataItem(row).toJSON();
items.push(item);
});
for (var i = 0; i < items.length; i++) {
// You must also clear the model's id field otherwise the copy may not be treated as a new item.
items[i].ProductID = 0;
grid.dataSource.add(items[i]);
}
});
@Stephen:ありがとう!どうやら私はあなたが上記のJSONの部分を述べた "MUST"の部分を見逃していました。魅力的な作品! –