Problem with width of ColVis collection div

Problem with width of ColVis collection div

greenflashgreenflash Posts: 58Questions: 5Answers: 0
edited October 2011 in General
I've been having a problem with the width of the ColVis collection div when using long column titles. I've got sWidth set to "css" and if I have a table occupying most of the window with the "Show/Hide Columns" button near the right hand side of the window I find that I can't get the buttons to be on one line when there are long column names.

I've got the width of the collection div set to auto, but the problem seems to be that when the div is formed it's near the right hand edge of the window and can't expand to the width that it really needs: it is constrained by the right hand side of the container. I feel sure that there must be some way of solving this with CSS and allowing the div to expand past the right hand edge of the container, but I can't seem to figure it out. Anyway, I've solved it by modifying ColVis.js and modifying the line in _fnCollectionShow() that intially positions the div from

[code]nHidden.style.left = iDivX+"px";[/code]

to

[code]nHidden.style.left = 0;[/code]

This means that when the div is initially formed it's over on the left hand side of the container and has as much room to expand rightwards as it needs. As the function later on adjusts nHidden.style.left whether you're using "auto" or not, this seems to be reasonably safe, though I haven't tested extensively.

Campbell
This discussion has been closed.