getSelected Returns: string
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
<button id="btnShowSelection">Show Selection</button>
<br/><br/>
<table id="grid"></table>
<script>
var grid = $("#grid").grid({
dataSource: "../Grid/GetPlayers",
columns: [ { field: "ID" }, { field: "Name" }, { field: "PlaceOfBirth" } ],
selectionMethod: "checkbox"
});
$("#btnShowSelection").on("click", function () {
alert(grid.getSelected());
});
</script>