IE issues with XML head config data

I am generating ‘dynamic’ columns, filters and data via dynamic XML generation. It works fine EXCEPT in IE 9 :imp:

In IE I get some strange scripting errors and the header and data rows have bad inline styles. I suspect it is due to a failure to declare the column types due to the script errors.

Now if I am not using the XML head configuration and just ‘hard’ code the configurations in the JS then it works fine in IE.

I am attaching my test files with the two different approaches to demo the issue.



Hopefully I am just being dumb and there is a way to make IE play nice with the dynamically generated XML config…

Thanks in advance for any help. I have my boss talked into buying the pro version if I can get this to work properly. :wink:
grid_test.zip (935 KB)

Please, try to set the widths to the columns in your xml:

<column type="ro" width="50" sort="str">ID</column> <column type="ro" width="50" sort="str">OS</column> <column type="ro" width="50" sort="str">Zone</column> <column type="ro" width="50" sort="int">Size</column> <column type="ro" width="50" sort="int">Hours</column> <column type="price" width="50" sort="int">Cost</column>

Thanks SematiK, that works! :exclamation: :exclamation:

BUT… if I dynamically add columns with widths set the table expands out of the layout boundaries. I want the added columns to all fit in the max table width, not to small or too wide.

Do I have to write my own JS to handle this on after adding a column? Or is there a hint you can give me to make it easier? :question:

Thanks for the fix, I will keep playing with this so it behaves the way I want it to. :nerd: :bulb:

Thinking more about this, the table works great dynamically in other browsers. IE is the only one that errors when the widths are not set. Would it be possible to get IE working without explicitly setting the widths for IE??

I had to ask - seems like that would be a good thing for the library…

Thanks again for the help. :exclamation:

Is there a way to set the widths in percents via XML configuration??

Thanks again!

First I removed the ‘enableAutoWidth’ setting from the XML config to keep the table overflow inside the parent DIV wrapper…
//xmlString.Append("<call command=“enableAutoWidth”>true");

Then I forced the XML to percent in my dynamic XML generation with:
xmlString.Append("");
xmlString.Append("%");
xmlString.Append("");

I counted the number of dynamic columns and found/set the percentage width of each column.
This is working pretty good for me… BUT one little problem.

The browser renders the cell width to match the content width in the cell, I think.

This again increases the width of the table beyond the initial rendering layout size (but with a horizontal slide bar inside the parent DIV wrapper. I realize the dhtmlxGrid library converts the ‘wp’ array from percents to pixels in the background for the proper computational width logic thereof.

Is there some math the dhtmlxGrid is performing in the background to increase the cell width to match the content or is this just the browser behavior I am seeing??

Thanks again…

You may try to use adjustColumnSize() method:
docs.dhtmlx.com/doku.php?id=dhtm … columnsize

to adjusts column size to make all content visible.