returns the selected elements ids
asArray | boolean | optional, specifies whether the returning result should be an array |
asString | boolean | optional, specifies whether the returning result should be a string |
object|array|string | a cell/row/column id or an array of them |
//return ids as an array of objects
grid.getSelectedId(true);
//return ids as an array of strings
grid.getSelectedId(true, true);
If no parameters were passed to the method, it returns the id as an object (for one selected element) or as an array of objects (for several elements).
The format of the selection result if the second parameter (asString) is false:
{ column:"votes", row:4, id:4 } // "row" selection
where:
If the "asString" parameter is set, the result value will depend on the selection mode: