If you want to control the column widths and allow the content to wrap if necessary, you can do so with CSS (and some JS in IE). Let's say you want to set the width of the 5th column. To support IE, in Javascript do:
<script> $(function() { $('.ie .web2py_table td:nth-child(5)').addClass('td-wrap'); }); </script> Then in CSS: .web2py_table td:nth-child(5), .web2py_table td.td-wrap { min-width: 15em; max-width: 20em; white-space: normal !important; } Anthony On Wednesday, September 5, 2012 10:06:41 AM UTC-4, Mandar Vaze wrote: > > Using maxtextlengths optional parameter partially helps. > http://web2py.com/books/default/chapter/29/07?search=maxtextlengths > > I say partially because this param controls how many characters are > displayed in the column (Only those many characters are sent by the server) > If one has too many wide columns, result could be ugly, especially buttons > in last column are now shown vertically - depending on screen size etc. > > I wish there was way to control the column width via web2py > > -Mandar > > On Tuesday, September 4, 2012 12:35:55 AM UTC+5:30, Ovidio Marinho wrote: >> >> how to limit the size of columns in sqlform.grid >> 25 >> 40 >> 15 >> 1 col lenght 25 ======================== >> ======================================================= ================= >> 2 col lenght 40 >> 3 col lenght 15 >> etc... >> >> >> >> >> >> Ovidio Marinho Falcao Neto >> Web Developer >> ovid...@gmail.com >> ovidio...@itjp.net.br >> ITJP - itjp.net.br >> 83 8826 9088 - Oi >> 83 9334 0266 - Claro >> Brasil >> >> >> --