PDA

View Full Version : Getting selection id's from a grid



dparker
29 Nov 2007, 11:45 AM
I cannot seem to find out how to get a list of selected items from a grid. Can someone help me with this?

santosh.rajan
29 Nov 2007, 11:52 AM
grid.getSelectionModel().getSelection() if it is row selection model.
grid.getSelectionModel().getSelectedCell() if it is cell selection model.
Default is rowselectionmodel

29 Nov 2007, 11:53 AM
grid.getSelectionModel().getSelections()



getSelections() : Array
Returns the selected records
Parameters:

* None.

Returns:

* Array
Array of selected records

29 Nov 2007, 11:54 AM
grid.getSelectionModel().getSelection() if it is row selection model.
grid.getSelectionModel().getSelectedCell() if it is cell selection model.
Default is rowselectionmodel

damn you're fast! :)

santosh.rajan
29 Nov 2007, 11:57 AM
;)

tryanDLS
29 Nov 2007, 12:14 PM
It's getSelections() <--plural.

dparker
29 Nov 2007, 12:28 PM
thanks guys that was helpful :)