Using a DOM element object as cell content
Hi,
I use a (self-written) library that handles business forms (validation and the like). Internally it uses DOM element objects. Currently, these objects are passed to a self-written grid component which shows them on screen.
Because maintaining my own grid component is a real pain, I'm thinking of switching to ActiveWidgets (either 1.0 or 2.0) for the grid. The problem is, this:
grid.setCellText(function(i, j){return document.createTextNode('test');});
Does (upon rendering) not append the text node to the cell, but assigns it to the cell's innerHTML property instead. This causes its toString method to be called, which returns "[object Text]".
Am I doing something wrong? If not, how much work would it be to make this possible? Would it be more work in version 1.0 than in version 2.0? (I wouldn't mind doing these changes myself if necessary.)
Thanks in advance,
Tim
I use a (self-written) library that handles business forms (validation and the like). Internally it uses DOM element objects. Currently, these objects are passed to a self-written grid component which shows them on screen.
Because maintaining my own grid component is a real pain, I'm thinking of switching to ActiveWidgets (either 1.0 or 2.0) for the grid. The problem is, this:
grid.setCellText(function(i, j){return document.createTextNode('test');});
Does (upon rendering) not append the text node to the cell, but assigns it to the cell's innerHTML property instead. This causes its toString method to be called, which returns "[object Text]".
Am I doing something wrong? If not, how much work would it be to make this possible? Would it be more work in version 1.0 than in version 2.0? (I wouldn't mind doing these changes myself if necessary.)
Thanks in advance,
Tim
Tim Cooijmans
May 18,