PDA

View Full Version : Question about RowSelectionModel beforerowselect event



giskard
6 May 2010, 3:52 AM
Hi

I'm handling beforerowselect to perform some validation on the selected row of my grid and see from the API docs that the beforerowselect listener fires with the following arguments:

this : SelectionModel
rowIndex : NumberThe index to be selected
keepExisting : BooleanFalse if other selections will be cleared
record : RecordThe record to be selected


My listener fires twice, the first time keepExisting is false, the second time, keepExisting is true. In both cases my handler returns false when validation fails to prevent the new row being selected. This works but why does the handler fire twice and what is the purpose of keepExisting?