Add a Horizontal Scroll bar to a cfgrid
Copy link to clipboard
Copied
Any ideas how I can add a horizontal scroll bar to a cfgrid? My grid goes off the page on some computers because of their screen resolution.
I tried the following woith no luck:
<cfgrid style="overflow-x:scroll; width:800px;">

Copy link to clipboard
Copied
Hi there,
If you were to put the cfgrid in it's own DIV and set it to overflow:auto that (I think) should do the trick. You would want to set the padding and margin of the div to 0 so that it really just acts as a container for the grid. I realize this is only a hack but it's one that I think should give you what you want with a minimal of efford.
On the flip side if you use s CFDIV you also have the option of dynamically changing out the entire body of the div. I suppose that might make it worth the time.
Hope this helps!
-Joe
Copy link to clipboard
Copied
Thanks but I have figured it out. To get a horizontal scrollbar within the grid you will need to do the following:
1) Set grid size "width" and "height"
2) Set gridcolumnwidth to be larger than the cfgrid width
There you have it, a horizontal scrollbar magically appears.

