This problem is only happening since I update to the latest version (2018.2.620) of UI for ASP.NET MVC from 2016.3.1028. Yeah, I know - I should keep up. But the project is in maintenance mode now.
I know this isn't likely much to go on, but I can't imagine how I'd pack the entire project and databases (or fakes thereof) and send it in, so I'm hoping something jumps out and is quite obvious. Any help appreciated! Even just a better idea what to look at would be good!
I have a button outside my grid for adding rows. It triggers .addRow() as follows:
$(
"#EntryGrid_New"
).click(
function
() {
$(
"#EntryGrid"
).data(
'kendoGrid'
).addRow();
});
When I hit that code, I get the following error:
Unhandled exception at line 26, column 9426 in http://localhost:23159/Scripts/kendo/2018.2.620/kendo.all.min.js
0x800a138f - JavaScript runtime error: Unable to get property '_move' of undefined or null reference occurred
The line it stops on in kendo.all.js is:
if
(arguments.length === 1) {
return
on.call(that, arguments[0]);
}
var
context = that, args = slice.call(arguments);
if
(
typeof
args[args.length - 1] === UNDEFINED) {
args.pop();
}
var
callback = args[args.length - 1], events = kendo.applyEventMap(args[0], ns);
if
(support.mouseAndTouchPresent && events.search(/mouse|click/) > -1 &&
this
[0] !== document.documentElement) {
MouseEventNormalizer.setupMouseMute();
var
selector = args.length === 2 ?
null
: args[1], bustClick = events.indexOf(
'click'
) > -1 && events.indexOf(
'touchend'
) > -1;
on.call(
this
, {
touchstart: MouseEventNormalizer.muteMouse,
touchend: MouseEventNormalizer.unMuteMouse
}, selector, { bustClick: bustClick });
}
if
(
typeof
callback === STRING) {
context = that.data(
'handler'
);
callback = context[callback];
args[args.length - 1] =
function
(e) {
callback.call(context, e);
};
}
args[0] = events;
on.apply(that, args);
return
that;
},
For completeness, here's the definition of the grid:
@(Html.Kendo().Grid<TimePlus.Models.ScheduleExceptionViewModel>()
.Name(
"EntryGrid"
)
.NoRecords(
"No exceptions found"
)
.Columns(columns => {
columns.Bound(model => model.ExceptionDate);
columns.Bound(model => model.ExpectedHours).EditorTemplateName(
"TwoDecimals"
);
columns.Command(c => { c.Edit(); c.Destroy().Text(
"Remove"
); }).Width(250);
})
.Editable(e => e.Mode(GridEditMode.InLine))
.Events(e => e.Edit(
"EntryGrid_Edit"
))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action(
"Schedule_EntryGrid_Read"
,
"Management"
).Data(
"GetSelectedDateAndUser"
))
.Destroy(destroy => destroy.Action(
"Schedule_EntryGrid_Destroy"
,
"Management"
))
.Update(update => update.Action(
"Schedule_EntryGrid_Update"
,
"Management"
))
.Create(create => create.Action(
"Schedule_EntryGrid_Create"
,
"Management"
))
.Events(e => e.Error(
"EntryGrid_Error"
))
.Model(model => {
model.Id(c => c.ID);
})
)
)