I have created my MVC Kendo Grid with foreign key column i.e. columns.ForeignKey(). A Dropdown list appears, and when I selected an item from the list it neither marked the record for update nor it fired any ajax _Update on server.
All of the sudden I found that each grids with combobox has this problem. Don't know how to proceed to dig out it further. If this is a bug then where should I look in for existing bugs and their work around?
Following js files are there in my _Layout
> /2014.2.903/jquery.min.js
> /2014.2.903/kendo.all.min.js
> /2014.2.903/kendo.aspnetmvc.min.js
> /2014.2.903/kendo.modernizr.custom.js
Edit: Take care of the nullable model properties
This is an important note to take care of. In case your model consists of nullable properties of integer, floats or even byte types, the Kendo grid will not be able to update the model properties to their values on create or edit events. It's a known bug in Kendo grids having Kendo drop down lists in their editor template.
Solution: Search all the drop-downs in grid, retrieve values and set the model manually. Here 'Ordermaster' is the name of my grid. It''s working fine for GridEditMode.InLine.
function onSave(e) {
// kendo nullable dropdown bug workaround
$("#Ordermaster tbody [data-role=dropdownlist]").each(function () {
var ddl = $(this).data("kendoDropDownList");
if (ddl) {
var v = ddl.value();
var p = ddl.list.attr('id').replace('-list', ''); //<< TODO: optimize it
if(p) e.model.set(p, v);
}
})
}