Fix #545 onSelect should check grid.allowSelect.

If grid.allowSelect returns false, onSelect should not do anything.