Issue
In a KendoUI grid with a selection set to "multiple", how do I invert a current selection?
Solution
You can do it in a simpler way:
const $grid = $("#grid").data("kendoGrid");
const $notSelected = $grid.tbody.find('> tr:not(.k-selected)');
$grid.clearSelection();
$grid.select($notSelected);
Although it won't works for paged grids. I think it will need a more complex code for that. But for not paged grid its ok.
Answered By - DontVoteMeDown Answer Checked By - Pedro (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.