Hi, Sorry if this is a repost on my post, I apologies for that. Btw, I tried doing it myself, but the column does not submit itself when creating or editing. Can you please help me with this? PS: All columns are just examples. Please do not based on their respective names.
Here's the grid:
Here's the DataSource:
Please, I hope you can help me. Thanks!
Here's the grid:
$("#grid").kendoGrid({ dataSource: dataSource, pageable: true, height: 340, toolbar: ["create"], columns: [{"field":"firstName","title":"First name"},{"field":"nickName","title":"Nick Name","template":"#= kendo.toString(nickName,'MM/dd/yyyy') #"},{"field":"lastName","width":"150px","editor":lastNameEditor},
{"command":"destroy","title":" ","width":"110px"}] , editable: true }); });Here's the DataSource:
var dataSource = new kendo.data.DataSource({ parameterMap: function(options, operation) { //alert(operation); return kendo.stringify(options); if (operation !== "read" && options.models) { return {models: kendo.stringify(options.models)}; } }, transport: { read: {dataType: "json", type: "POST",data: {"SQLCMD":"SELECT * FROM gridTest","Table":["firstName","nickName","lastName"],"PrimaryKey":"peopleID"}}, update: { type: "POST" }, destroy: { type: "POST" }, create: { type: "POST", data: { req: ["firstName","nickName","lastName"] } } }, // determines if changes will be send to the server individually or as batch batch: false, //... pageSize: 30, data: blankData, autoSync: true, schema: { model: { id: "peopleID", fields: {
"peopleID":{"editable":false,"nullable":true},
"firstName":{"type":"string","validation":"required":true},"nullable":false,"defaultValue":""},
"nickName":{"type":"date","validation":{"required":true},"nullable":false,"parse":function(value) { return kendo.toString(value) }},
"lastName":{"type":"string","validation":"required":true},"nullable":false}} } , parse: function (data) { // alert(data); return data; } } });Please, I hope you can help me. Thanks!