Getting these errors when trying to update spreadsheet cells. Uncaught TypeError: Cannot read property 'offsetWidth' of undefined
The issue is happening even on the demo component when editing a cell:
https://demos.telerik.com/aspnet-ajax/spreadsheet/examples/overview/defaultcs.aspx
Workaround from Admin:
Load the following script under the ScriptManager:
<script>
if (kendo && kendo.spreadsheet && kendo.spreadsheet.SheetEditor) {
kendo.spreadsheet.SheetEditor.fn.activate = function (options) {
var viewElement = this.view.element, viewWidth, scrollerElement, scrollbarWidth;
this._active = true;
this._rect = options.rect;
this._range = options.range;
this.cellInput.position(options.rect);
this.cellInput.resize(options.rect);
this.cellInput.tooltip(options.tooltip);
this.cellInput.activeCell = this.barInput.activeCell = this._range.topLeft();
this.cellInput.activeSheet = this.barInput.activeSheet = this._range._sheet;
if (viewElement) {
viewWidth = viewElement.width();
scrollerElement = viewElement.find('.' + kendo.spreadsheet.View.classNames.scroller)[0];
scrollbarWidth = scrollerElement.offsetWidth - scrollerElement.clientWidth;
this.cellInput.element.css('max-width', viewWidth - scrollbarWidth - this.cellInput.element.position().left + 'px');
}
this.trigger('activate');
return this;
}
}
</script>