This is a migrated thread and some comments may be shown as answers.

JS runtime error happening only in IE 9, not other versions of IE

2 Answers 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Florence
Top achievements
Rank 1
Florence asked on 18 Mar 2013, 09:17 PM
Hi,

We have a fairly simple grid on a page.  The grid displays fine in Chrome and IE 10 and IE 9 with compatibility turn on.  With IE9 or IE10 with compatibility turned on, we get the following JS runtime error:

Unhandled exception at line 9, column 7339 in   http://localhost:55974/Scripts/KendoUi/kendo.web.min.js
0x800a139e - Microsoft JScript runtime error: Invalid template:'<tr data-uid="#=data.uid#" role='row'><td  role='gridcell'>${data.[==null?'':data.[}</td><td  role='gridcell'>${data.{==null?'':data.{}</td><td  role='gridcell'>${data. ==null?'':data. }</td><td  role='gridcell'>${data.f==null?'':data.f}</td><td  role='gridcell'>${data.i==null?'':data.i}</td><td  role='gridcell'>${data.e==null?'':data.e}</td><td  role='gridcell'>${data.l==null?'':data.l}</td><td  role='gridcell'>${data.d==null?'':data.d}</td><td 
...

I truncated the full error output but attached the full output to this post.  Again IE9 is the only browser that causes this error.  Everything works fine in IE 10 and IE 8 (and other browsers).

We are evaluating Kendo UI, but this is a major show-stopper for us and we need to make a decision in the next couple of days.  if we cannot find a workaround, we will need to go with a different 3rd party library.  

This is how the grid is declared:
        <table id="jobs" 
               data-role="grid" 
               data-bind="source: jobsList, events: { change: gridChange }"
               data-columns="[{ field: 'Id', width: 50, title: 'Id', filterable: true}, 
                            { field: 'Name', width: 80, title: 'Name', filterable: true}, 
                            { field: 'Description', width: 150, title: 'Description', filterable: true},
                            { command: ['edit','destroy'], title: '' }]"  
               data-toolbar="[{ name: 'create', text: 'Add new job'}]"
               data-pageable="true"
               data-editable="{mode: 'inline', confirmation: 'Are you sure you want to delete this job?  It will not be recoverable'}"
               data-sortable="true"
               data-column-menu="false"
               data-resizable="true"
               data-selectable="true"
               data-filterable="{ extra: false, operators: { string: { startswith: 'Starts with', eq: 'same as',  neq: 'different' }, number: {eq: '==',  neq: '!=' , gt: '>', lt: '<'}}}"
            >
        </table>

I can provide the datasource code as well if needed.

Any help will be greatly appreciated.

Thank you.

2 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 19 Mar 2013, 08:14 AM
Hello Florence,

I suspect that the error is due to the multiline Grid column definition arrangement. You should try the Q1 2013 BETA release or set the column definition on a single line. 

Regards,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Florence
Top achievements
Rank 1
answered on 19 Mar 2013, 02:30 PM
Thanks Rosen.  Declaring all the columns on a single line solved the issue.

 For those with the same problem, here's what the definition looks like after applying the fix:

        <table id="jobs" 
               data-role="grid" 
               data-bind="source: jobsList, events: { change: gridChange }"
               data-columns="[{ field: 'Id', width: 50, title: 'Id', filterable: true}, { field: 'Name', width: 80, title: 'Name', filterable: true}, { field: 'Description', width: 150, title: 'Description', filterable: true},{ command: ['edit','destroy'], title: '' }]"  
               data-toolbar="[{ name: 'create', text: 'Add new job'}]"
               data-pageable="true"
               data-editable="{mode: 'inline', confirmation: 'Are you sure you want to delete this job?  It will not be recoverable'}"
               data-sortable="true"
               data-column-menu="false"
               data-resizable="true"
               data-selectable="true"
               data-filterable="{ extra: false, operators: { string: { startswith: 'Starts with', eq: 'same as',  neq: 'different' }, number: {eq: '==',  neq: '!=' , gt: '>', lt: '<'}}}"
            >
        </table>
Tags
Grid
Asked by
Florence
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Florence
Top achievements
Rank 1
Share this question
or