clearSelection()

1 posts, 0 answers
  1. Dr.YSG
    Dr.YSG avatar
    210 posts
    Member since:
    Dec 2009

    Posted 09 Aug 2012 Link to this post

    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);
Back to Top