A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/events/save below:

save - API Reference - Kendo UI Grid

<div id="grid"></div>
<script>
function grid_save(e) {
    if (e.values.name !== "") {
      
      if (e.values.name !== e.model.name) {

        console.log("name is modified");
      }
    } else {
        e.preventDefault();

        console.log("name cannot be empty");
    }
}
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: "destroy" }
  ],
  dataSource: {
    data:[
      { id: 1, name: "Jane Doe", age: 30},
      { id: 2, name: "John Doe", age: 33}
    ],
    schema: {
      model: { id: "id" }
    }
  },
  editable: true
});
var grid = $("#grid").data("kendoGrid");
grid.bind("save", grid_save);
</script>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4