Hello

maxtextlength is for all fields, you need use maxtextlengths

http://web2py.com/book/default/chapter/07#SQLFORM.grid-and-SQLFORM.smartgrid


On Fri, Jan 18, 2013 at 9:40 AM, Sverre <sverreodeg...@gmail.com> wrote:

> I have the controller:
>
> def commodities():
>     tbl = db.commodities
>     fields = [tbl.itemcode,tbl.name,tbl.unit,tbl.supplier,tbl.contact]
>     query = (tbl.id>0)
>     order = [tbl.itemcode]
>     maxlen = {'commodities.itemcode':2,'commodities.name
> ':2,'commodities.unit':2,'commodities.supplier':2,'commodities.contact':2}
>     return dict(grid=SQLFORM.grid(query,fields=fields, csv=False,
> orderby=order,maxtextlength=maxlen))
>
>
> The grid is working well, but not the maxtextlength parameter. If I set
> the parameter to 2, it's working but not when I'm setting all field
> individually. Has someone an idea?
>
>
>
>
>  --
>
>
>
>

-- 



Reply via email to