Return the id of the selected record. If the multiple selection method is one this method is going to return only the id of the first selected record.
Examples
sample
<button id="btnShowSelection">Show Selection</button>
<br/><br/>
<table id="grid"></table>
<script>
var grid = $('#grid').grid({
dataSource: '/0_6/Grid/GetPlayers',
columns: [ { field: 'ID' }, { field: 'Name' }, { field: 'PlaceOfBirth' } ],
selectionMethod: 'checkbox'
});
$('#btnShowSelection').on('click', function () {
alert(grid.getSelected());
});
</script>