IE 7,8 kendo ui binding problem - unknown runtime error
TL;DR; If you are getting unknown runtime error in the kendo javascript code. Check if you are using correct binding methods as per the demo on telerik site.
You’ve got to love IE with all the “special behaviors” in it. I have spent recently 10h trying to fix little problem found only in IE. My project have to support version 7, 8 ( you know - “enterprise IT” ). New version number 10 seems to be working really ok, no problems with it ( apart from that it looks almost like chrome ). Thanks to Microsoft and their abandoment effort, I don’t have to worry about revolutionary IE 6.
Problem:
Project uses kendo ui framework to create elements on the View. There is a support for MVVM pattern with multiple different bindings, just like knockout.js with similar syntax and behavior. One of the bindings is supposed to be changing text value. This binding is normally used with textboxes but we have used it with “label” and “anchor”. It worked fine on Chrome, Firefox, IE 10 but then the fun began. Tests on other IE’s version caused “runtime error”. Indeed very informative message, thanks IE just like “unknown error” on Sharepoint.
This “runtime error” was raied on this line of code.
After some research, I discovered that earlier versions of microsoft’s browser are very restrictive about certain changes performed on DOM elements. In this scenario you can’t change ‘innerText’.
I tried to create a workaround which removed and added new element, but this instead caused other problem. It seems that here IE is also very restrictive here.
Solution:
Fortunately solution is quite simple, instead of ‘text’ binding use ‘value’ binding. This one uses code that works fine in IE.