[web2py] Re: presenting None values in SQLFORM.grid

2014-12-11 Thread Anthony
Field('myfield', 'integer', represent=lambda v, r: v if v is not None else '') Maybe we should add an option to the grid for this, as it seems to be a common need. On Thursday, December 11, 2014 7:38:40 AM UTC-5, Yebach wrote: Hello In my SQLFORM.grid I have fields of type integer (as in

[web2py] Re: presenting None values in SQLFORM.grid

2014-12-11 Thread Simon Ashley
something like this may help: db.table.field.represent = lambda value, row: DIV(value if value else '-', etc...) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list