jxlib v3 Grid example throws exception in IE8
Reported by zolinko | January 12th, 2012 @ 09:51 AM | in 3.2
The v3.0 Grid example page throws an error in IE8
(v8.0.6001.18702).
This error also appears in v3.1.1 - in the same context.
Row: 17508
Error: Object doesn't support this property or method.
This error occurs because of the grid's button rendering doesn't
work in IE8.
When I remove the column that holds the buttons, the grid is
rendered correctly.
Details:
In the Jx.Grid.ColumnModel in the getRow method the next line
throws the error:
tr.childNodes[obj.index].adopt(obj.column.getHTML());
'tr' is a DISPHTMLTableRow object, that has no adopt method (When the columnModel contains a column with button-type renderer).
Comments and changes to this ticket
-

zolinko January 12th, 2012 @ 10:22 AM
Edit: tr.chilNodes[obj.index] is a DispHTMLTableCell and that has no adopt method
-

zolinko January 12th, 2012 @ 01:56 PM
I found a simple but temporary solution for this.
Comment out the original ...adopt... call
and insert the Element.adopt method body (replacing the 'argument' to '[obj.column.getHTML()]'
and the 'this' to tr.childNodes[obj.index].So here is the actual code (inside the domInserts.each iteration, at the end of ColumnModel.getRow method):
//tr.childNodes[obj.index].adopt(obj.column.getHTML());//comment out, because: Object doesn't support this proerty or method
//start:adopt body var par = tr.childNodes[obj.index], fr, elms = Array.flatten([obj.column.getHTML()]), len = elms.length;
if (len > 1) par = fr = document.createDocumentFragment();
for (var i = 0; i < len; i++){var elm = document.id(elms[i], true); if (elm) par.appendChild(elm);} if (fr) tr.childNodes[obj.index].appendChild(fr);
//end:adopt body -

Jon Bomgardner January 12th, 2012 @ 05:11 PM
- → Assigned user set to Jon Bomgardner
Can you try this instead:
change that line to read:
document.id(tr.childnodes[obj.index]).adopt(obj.column.getHTML());
Let me know if that works.
Jon
-

Jon Bomgardner January 13th, 2012 @ 12:38 AM
- → Milestone set to 3.2
- → State changed from new to accepted
-

zolinko January 13th, 2012 @ 10:22 AM
Hi Jon,
It seems that your solution works (I corrected your typo childnodes -> childNodes:document.id(tr.childNodes[obj.index]).adopt(obj.column.getHTML());Thx
-

Jon Bomgardner January 13th, 2012 @ 05:34 PM
- → State changed from accepted to started
- → Tag set to defect
Your welcome. I'll be sure to get this added into the library as a permanent fix.
-

Jon Bomgardner January 14th, 2012 @ 04:23 PM
- → State changed from started to resolved
(from [5e7e26a78d478fb213cd42bc1b20538bc470caf6]) fix for issue 67 [#67 state:resolved] https://github.com/JxLib/JxLib/commit/5e7e26a78d478fb213cd42bc1b205...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Tags
Referenced by
-
#66 3.1.1. Example page doesn't work in IE8
Ahh... yes. This is actually fixed in github master under...