javascript - Kendo UI JS grid editing cells won't work and gives no error -


when press of cells cell focused can't type in field. no console errors whatsoever. here code:

    $(document).ready(function () { datasource = new kendo.data.datasource({     transport: {         read: {             url: '/discountpromotion/get',             datatype: "json",         },         update: {             url: '/discountpromotion/update',             datatype: "json",             type: "post",             contenttype: "application/json"         },         destroy: {             url: '/discountpromotion/delete',             datatype: "json",             type: "post",             contenttype: "application/json"         },         create: {             url: '/discountpromotion/add',             datatype: "json",             type: "post",             contenttype: "application/json"         },         parametermap: function(options, operation) {             if (operation !== "read") {                 return json.stringify({ discountpromotiondto: options });             }         },      },     pagesize: 10,     schema: {         model: {             id: "id",             fields: {                 id: { type: "number" },                 code: { type: "string" },                 startdate: { type: "date" },                 enddate: { type: "date" },                 minimumcost: { type: "number" },                 maximumcost: { type: "number" },                 quantity: { type: "number" },                 customerid: { type: "number" },                 countrycode: { type: "string" },                 discount: { type: "number" },                 modelname: { type: "string" }             }         }     } }); $("#discountpromotiongrid").kendogrid({     datasource: datasource,     batch: true,     toolbar: ["create", "save", "cancel"],     height: 400,     navigatable: true,     pageable: {         refresh: true,         pagesizes: true,         buttoncount: 5     },     columns: [     {         field: "modelname",         title: "modelname",         editor: modelnamedropdown,         template: "#=modelname#",         width: 150     },     {         field: "code",         title: "promotioncode",         width: 150     },     {         field: "startdate",         title: "startdate",         template: '#= kendo.tostring(startdate,"yyyy-mm-dd") #',         width: 120     },     {         field: "enddate",         title: "enddate",         template: '#= kendo.tostring(enddate,"yyyy-mm-dd") #',         format: "{0:yyyy-mm-dd}",         parseformats: ["yyyy-mm-dd"],         width: 120     },     {         field: "minimumcost",         title: "mincost",         width: 100     },     {         field: "maximumcost",         title: "maxcost",         width: 100     },     {         field: "quantity",         title: "quantity",         width: 80     },     {         field: "customerid",         title: "customerid",         width: 80     },     {         field: "countrycode",         title: "countrycode",         width: 40     },     {         field: "discount",         title: "discount",         width: 40     },     {         command: "destroy",         title: "&nbsp;",         width: 120     }],     editable: true });    function modelnamedropdown(container, options) {     $('<input required data-text-field="modelname" data-value-field="modelname" data-bind="value:' + options.field + '"/>')         .appendto(container)         .kendodropdownlist({             autobind: false,             optionlabel: "select model...",             datasource: {                 serverfiltering: true,                 transport: {                     read: {                         url: '/discountpromotion/getmodelnamesbycustomerid',                         datatype: "json",                         type: "post",                         contenttype: "application/json"                     }                 }             }         }); } 

enter image description here

please help! have no clue wrong.

here image of grid , when have pressed cell. there marker never shows in cell can't type anything. , occurs on of them!

you need add edit command columns.

{     command: ["edit", "destroy"],     title: "&nbsp;",     width: 120 }], editable: "inline" 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -