java Kendo UI grid how to access model fields -
i displaying kendo ui grid in jsp page . here code . have designed webservice create method . method getting called . not able access model fields . means want access fields values of selected row , insert database. how can access ? .
<div id="example"> <div id="grid"></div> <script> $(document).ready(function () { var crudservicebaseurl = "http://localhost:8081/app/personcontacttypes", datasource = new kendo.data.datasource({ transport: { read: { url: crudservicebaseurl + "/getall", datatype: "json" }, update: { url: crudservicebaseurl + "/update", datatype: "json" }, destroy: { url: crudservicebaseurl + "/delete", datatype: "json" }, create: { url: crudservicebaseurl + "/create", datatype: "json" }, parametermap: function(options, operation) { if (operation !== "read" && options.models) { return {models: kendo.stringify(options.models)}; } } }, batch: true, pagesize: 20, schema: { model: { id: "personcontactid", fields: { personcontactid: { editable: false, nullable: true }, dropdown: { editable: true, nullable: true }, formattedappearnce: { editable: true, nullable: true }, fulldefination: { editable: true, nullable: true }, notes: { editable: true, nullable: true } } } } }); $("#grid").kendogrid({ datasource: datasource, navigatable: true, pageable: true, height: 550, toolbar: ["create", "save", "cancel"], columns: [ { field: "formattedappearnce", title: "formatted appearance", format: "{0:c}", width: 140 }, { field: "dropdown", title: "drop down", format: "{0:c}", width: 140 }, { field: "fulldefination", title: "full defination", width: 140 }, { field: "notes", width: 190 }, { command: "destroy", title: " ", width: 50 }], editable: true }); }); </script> </div>
Comments
Post a Comment