w2grid.getSelection

Returns current grid selection.
getSelection(returnIndex)
Returns array.

Description

This method returns an array of recids for all currently selected records in the grid. When you add records you need to provide unique .recid for each record.
If returnIndex is set to true, the method will return indexes of selected records in the .records array instead of their recids. If you have grid defined in the following way: You can get selected records: Please note if you try to get selection in onClick event, you need to:

User Comments

comments powered by Disqus