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" class="gj-button-md">Show Selection</button>
<br/><br/>
<table id="grid"></table>
<script>
var grid = $('#grid').grid({
dataSource: '/Players/Get',
columns: [ { field: 'ID', width: 56 }, { field: 'Name' }, { field: 'PlaceOfBirth' } ],
selectionMethod: 'checkbox'
});
$('#btnShowSelection').on('click', function () {
alert(grid.getSelected());
});
</script>