In Example 9, if you execute
grid.setSelectedRows([0, 1]);
the first two rows are effectively selected. But said selection disappears when clicking a row or traversing them with the arrow keys.
Note that active
(related to the clicks/keydowns) and selected
(related to the selection model) are two different CSS classes.
How to prevent the mouse and keyboard actions from interacting with the selection model?
If you don't want the active cell tracking affecting the selection, you can set the "selectActiveRow" option in the RowSelectionModel to false.