PDA

View Full Version : [CLOSED] CheckBoxSelectionModel deselects



gslender
10 Sep 2008, 4:21 AM
CheckBoxSelectionModel provides no way to stop deselections and allows user to unselect previously selected rows - leaving the grid with nothing selected.

Easy solution is to add a "allowDeselects" getter/setter and check to stop deselections of existing selected rows

Code added to handleMouseDown(GridEvent e) in CheckBoxSelectionModel is the check


if (isSelected(m)) {
if (allowDeselects) doDeselect(Arrays.asList(m), false); // <<<<< new code
} else {
doSelect(Arrays.asList(m), true, false);
}