This is a migrated thread and some comments may be shown as answers.

clearSelection()

0 Answers 952 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dr.YSG
Top achievements
Rank 2
Dr.YSG asked on 09 Aug 2012, 05:10 PM
It would be nice if clearSelection() took an argument, so that I could just deslect a few rows. Right now I find that I am having to first clear all and then select, which does not perform well when the number of rows selected is over 25, and I want to deselect one (that has a column with the contents of valueOf(data.idx).

grid.select("only the desired records") did not work, i.e. if there were three previously selected, and this new list was length two, then all three would remain selected. So I have to clearSelection().


var jFilter = ":not(:contains('{0}'))";
var records;
jFilter = jFilter.format(data.idx);
records = GridData.grid.tbody.find(">tr.k-state-selected[data-uid]").filter(jFilter);
GridData.grid.clearSelection();
GridData.grid.select(records);

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Dr.YSG
Top achievements
Rank 2
Share this question
or