Invalid Argument

Using dynamic smart rendering, I get an “Invalid Argument” with IE8 on this code in dhtmlxgrid.js:



    this.hdr.rows[0].cells[i].style.width=this.cellWidthPX[i]+“px”;



I’ve determined it’s not from having a width attribute in my XML header columns:



    

    

If I put width=“some number” in the column tag, then it works, but it sets a specific width rather than dividing the columns evenly.



This is not a problem in Firefox, just Internet Explorer.

I’ve determined it’s not from having a width attribute in my XML header columns

Each tag must have width atrribute. Otherwise IE will return Invalid Argumetn error.
You can use setInitWidthsP() method to set column width in percents. Please find example here dhtmlx.com/docs/products/dht … esize.html


The only problem is that it appears setInitWidthsP() is used when you know how many columns are going to be in the grid. I want to be able to use the same HTML for reports from multiple tables, so I won’t always have the number of columns. My XML is used to set the column headers and determine the number of columns.

Firefox works as I expected it to – it didn’t encounter column widths in the XML, so it spread them out evenly across the grid. It’s only Internet Explorer that threw an error.


example.xml.zip (754 Bytes)
example.html.zip (470 Bytes)

Also, when I run this from IE without column widths, it displays the column header row just as it does in Firefox – spread evenly across the grid width. It’s only after displaying the header row that it throws the error.

FYI, my company just registered the Enterprise version. I can provide our registration number now if you need it.


Hello,


you can try to set * as a width for each column. In this case the width will be calcilated automatically:


<?xml version="1.0"?> <column type=‘dyn’ width="*">Cust#Invoice #…Unit Price …

Worked perfectly! Many thanks!