Grid 2.1 build 90226 - setColumnHidden

We’re migrating our code from 1.6 to 2.1 and noticing a strange error with hiding a column (and headers in general.)

Our grid is created with something like the following:

The result of the above is that the first column in the DATA is hidden, but the first column in the HEADER is not (which results in the header being mis-aligned.)

The code above works as expected if we revert the “dhtmlxgrid.js” file back to the 1.6 version.

I can’t replicate this in any of the sample files included with 2.1, so I’m not sure what else to provide…


- Dave

Please check if all of your attached files if from the latest realize.This issue can occurs if you are mixing files from 1.6 and 2.1 versions.

Checked the files and they are all 2.1. Cleared cache and problem still existed.

Tracked it down to the include of a “strict” DTD definition:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "">

When this DOCTYPE is used, the headers have the issue mentioned above. This DOCTYPE was supported in the previous versions and is something that is required for our application.


- Dave

Was this ever resolved? I am having the same problem when I use the EmulateIE8 meta tag, which I have to use because if I don’t then I get warnings about the scripts taking too long to run.



when I use the EmulateIE8 meta tag,
Try to add the next line before components usage

if (_isIE) _isIE = true;

It must resolve issues related to meta tag usage.

Thanks Stanislav, but that does not seem to be resolving the issue.

To check I am doing as you instructed, my code for initializing the grid is now

if (_isIE) _isIE = true; lineItemGrid = new dhtmlXGridObject("lineItemGridBox"); ...

Is that correct?



Yep, you are using code correctly.
If issue still occurs for you - please provide any kind of sample or demo link where it can be reconstructed.

Attached. You need to add localhost to the compatibility view list.

Thanks. (1.24 KB)