getAll Returns: array
Return an array with all records presented in the grid.
Examples
<button id="btnGetAllName">Get All Names</button>
<br/><br/>
<table id="grid"></table>
<script>
var grid = $("#grid").grid({
dataSource: "../Grid/GetPlayers",
columns: [ { field: "ID" }, { field: "Name" }, { field: "PlaceOfBirth" } ]
});
$("#btnGetAllName").on("click", function () {
var records = grid.getAll(), names = "";
$.each(records, function () {
names += this.record.Name + "(id=" + this.id + "),";
});
alert(names);
});
</script>