jquery - How to update multiple rows on kendo grid with outside button -



jquery - How to update multiple rows on kendo grid with outside button -

i have kendo grid columns as:

i write function close button, when user select rows check , click close button, auto update isclosed column "true"

and code:

$(function () { $('#btnclose').click(function () { var grid = $('#grorders').data("kendogrid"); $.each($('#grorders :checkbox:checked').closest('tr'), function () { var info = grid.dataitem($(this)); data.set("isclosed", true); }); }); });

when test, update first row checked, don't know why? please help me.

the problem invoke set("isclosed", true) kendoui redraws grid next grid.dataitem not homecoming expect.

instead, seek doing first each getting list of items need modified , sec each modifying them. like:

$('#btnclose').click(function () { var grid = $('#grid').data("kendogrid"); var rows = $('#grid :checkbox:checked'); var items = []; $.each(rows, function () { var item = grid.dataitem($(this).closest("tr")); items.push(item); }); $.each(items, function(idx, elem) { elem.set("isclosed", true); }); });

jquery asp.net kendo-ui telerik

Comments

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -