I'm trying to keep count of the number of rows the user has selected in a grid.
I declare an array in the page header and use a handler on the grid's OnSelect JS event to modify this array based on 'row' and 'selected' arguments.
The grid has ReadOnly = true, ShowSelectColumn = true, CanRangeSelect = true and RowSelect = true.
I've found that when the user deselcts a row, the 'row' arg for that event is set as -1 ('selected' = false as expected), and also that if I select and deselct a row several times a JS error is generated in the browser (firefox 47.0.1):
If I keep un/selecting the row it generates more instances of this error.TypeError: cell.className is undefined
while (cell && (cell.className.indexOf("cell") == -1 || cell.tagName != "TD"))
JTPlatinumGrid.js (line 864, col 13)
Turns out this behaviour is independent of contents of OnSelect handler.