SitePen/dgrid — pull request #258 by dstarke (2012-08-20 18:14:17+00:00)
Title: Fixes to isSelected

Fixed two problems I noticed with Selection.isSelected():
- deal more correctly with falsy ids (like 0)
- allow it to return the correct value when selectAll has been issued, but the user has not scrolled through all the data in an onDemand list. Previously, it would only return true for isSelected() if the key was in the selection object, but in an onDemand list the key doesn't end up in the selection object until the row's page was scrolled into view. As a result, if you did a selectAll(), then there were a lot of objects that should be considered to be selected that isSelected() was returning false for. Basically, I just copied the logic used elsewhere to determine selection into isSelected(), so that if "selectAll" is true and the key is not in the selection object, then it should return true instead of false.