grid control alignment issue.

I’ve been having some issues with column alignment in the grid control. I did some debugging and found the issue. If I have the grid control div tag within an element that specifies alignment, it throws off the alignment of the columns and footer in the grid.

I want to have the grid centered. See snipit below. See full example below that.

For example:

<-- this is causing the problem. If I take it off alignment is fine.

Thank you,

Carmine Marino

Full Example below:






Unfortunately the same sample works correctly when tested from our side ( please check attachment )
Most probably issue caused by used custom skin.

The align setting on external container must not affect content of grid, the settings for each column redefined by setColAlign command, the align of headers and footers defined by related css styles in dhtmlxgrid.css (87.3 KB)

The problem is with the Footer.  The example you sent me that you said is working has the attachFooter line commented out.  I believe you did this because the codebase you sent me was the demo version which doesn’t include footers.  When I use my codebase the footer is misaligned when using align=center in a table.

Can you replicate this?

Carmine Marino

Sample with full version of dhtmlxgrid.js and enabled footer sent by email - there still no any misalignment.
The grid has text alignment defined in dhtmlxgrid.css for headers|footers, so any external align setting will be redefined.

You have next code
probably the issue caused by some custom styles in your skin.
If issue still occurs for you - please provide used css file.

We have absolutely
the same problem, no matter which skin is used for a grid!

Have you find the answer to this problem?!


The way I got around this issue was to do the centering via column widths rather than using the align attribute.  See below





Hope this helps.