Make grid view larger & add scroll bar to top

229 views
Skip to first unread message

Austin Taylor

unread,
Mar 7, 2014, 1:31:51 PM3/7/14
to web...@googlegroups.com
Hello,

I'm using grid=SQLFORM.grid(db.table)

I want to know how to make the form it returns larger? I have looked all over for the CSS and I can't find it. It just says width 100% for .web2py_grid

Is there a way to make the overall layout larger since I have a bigger table, and is it possible to add a scroll bar to the top so I don't have to scroll all the way to the bottom to scroll to the right? Fixed headers would be nice too, but I'll keep trying to figure that out.

Thank you!!

-Austin

Tim Richardson

unread,
Mar 8, 2014, 7:42:16 PM3/8/14
to web...@googlegroups.com
When you say larger, do you mean wider?
It defaults to 100% as you say, so I don't understand what you are experiencing and what you want instead.

Austin Taylor

unread,
Mar 8, 2014, 8:36:13 PM3/8/14
to web...@googlegroups.com
yeah I mean the entire grid wider. I know its at 100%, but I'm not
sure how to make the overall layout of my grid bigger. I guess I would
have to increase the default css layout?

On Sat, Mar 8, 2014 at 7:42 PM, Tim Richardson <t...@growthpath.com.au> wrote:
> When you say larger, do you mean wider?
> It defaults to 100% as you say, so I don't understand what you are experiencing and what you want instead.
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/HMCeGJ4BitM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Tim Richardson

unread,
Mar 8, 2014, 10:59:52 PM3/8/14
to web...@googlegroups.com

Tip, in case you didn't know: exploring CSS with a tool like Firefox's Firebug is a great way to quickly work out which css in which file is driving what you see.
Learning Firebug or its equivalent (like Chrome's developer tools) is pretty useful with modern sites since there are so many sources of CSS.


100% means the grid is as wide as its enclosing DIV, which you know of course. So you're correct,  you want to make the whole page wider. Explore the CSS above, using a tool like Firefox.
On a default page (an app copied from the welcome app) you'll see that the grid is probably contained in a container class div; the width comes from the bootstrap css I think. There are few approaches to how you provide a wider screen. You can put css directly into this specific view, or you can adjust your layout.html, or make a layout_wide.html and use that in pages which you need to be wider.


It may be considered an unusal request here because most people are conscious of keeping sites responsive to different screen widths. Perhaps you can redesign your form so that people click buttons or links to view additional information about a record.

Austin Taylor

unread,
Mar 10, 2014, 12:41:17 PM3/10/14
to web...@googlegroups.com
Thank you for the ideas, Tim. I like the idea of the wide_layout.html.
I'll poke around and see if I can find where web2py sets the page
width.

Cheers!

Austin

Antonis Loumiotis

unread,
Sep 10, 2014, 3:45:12 AM9/10/14
to web...@googlegroups.com
LoveWeb2py wrote "is it possible to add a scroll bar to the top so I don't have to scroll all the way to the bottom to scroll to the right?"

I also have the same question.

Thanks,
Antonis
Reply all
Reply to author
Forward
0 new messages