addRow Returns: grid


Add new row to the grid.

Parameters

NameTypeDescription
record {object} Object with data for the new record.

Examples

  
Edit this example
<button id="btnAdd">Add Row</button> <br/><br/> <table id="grid"></table> <script> var grid = $("#grid").grid({ dataSource: "../Grid/GetPlayers", columns: [ { field: "ID" }, { field: "Name" }, { field: "PlaceOfBirth" } ] }); $("#btnAdd").on("click", function () { grid.addRow({ "ID": grid.count() + 1, "Name": "Test Player", "PlaceOfBirth": "Test City, Test Country" }); }); </script>