Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Add a Horizontal Scroll bar to a cfgrid

New Here ,
Sep 24, 2010 Sep 24, 2010

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;">

2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 29, 2010 Sep 29, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 30, 2010 Sep 30, 2010
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources