DOM error using Chrome

re: //v.2.5 build 91111

Hi,

This looks like a problem.

If I copy this sample code out of your CHM help file (from the topic “setStyle(ss_header, ss_grid, ss_selCell, ss_selRow)”):

mygrid.setStyle(“background-color:navy;color:white; font-weight:bold;”, “”,“color:red;”, “”);

and run it in Google’s Chrome on Windows, I get this error:

Uncaught Error: SYNTAX_ERR: DOM Exception 12

/codebase/dhtmlxgrid.js:289

Possibly Chrome’s DOM is different in some respect?

Comment?

Thanks,
Karl

This issue was confirmed and fixed. Fixes will be included at the next version of dhtmlxGrid.

Thank you for the confirmation.

Since myGrid.setStyle() breaks Chrome, is there any work around for styling the grid’s header row?

Thanks,
Karl

You can stype grid’s header row with 3rd parameter of setHeader() method or with 2nd parameter of attachHeader() method.

docs.dhtmlx.com/doku.php?id=dhtm … _setheader
docs.dhtmlx.com/doku.php?id=dhtm … tachheader

I have the same issue with Chrome and with Opera.

//v.2.6 build 100722

mygrid.setStyle("","","", “”); is fine, but populating any of those four fields causes the error, and the grid will not render.

The advice given, to use setHeader() or attachHeader() is sound, if one wished just to format the header. Unfortunately that won’t help me at all. Here is the setStyle that I’ve been using whilst testing successfully in Firefox:

mygrid.setStyle(“background-color:#900; color:white; font-weight:bold;”,“font-family:‘MS Mincho’; font-size:14pt;”,"","");

It’s the grid style that I’ve changed, so xxxHeader won’t help there.

Appreciate any advice, thanks.

Hi, was this issue fixed as I am having the same problems (v.2.5 beta 2 build 90814).

I am using the professional edition so would need a fix I could copy and paste preferably.

Thanks

This issue was fixed at the latest version of dhtmlxGrid (2.6). Please contact sales@dhtmlx.com to update your files

This issue has not been fixed with Opera for 2.6 build 100916 and it has been broken for a year now.

Except now I am pretty much stuck without this fix. Are there any new improved versions available?

FYI, I fixed it easily by changing the following line:

document.styleSheets[0].insertRule(prefs[i]+(" {"+this.ssModifier[i]+" };"), document.styleSheets[0].cssRules.length);

to:

document.styleSheets[0].insertRule(prefs[i]+(" {"+this.ssModifier[i]+" }"), document.styleSheets[0].cssRules.length);