Um, actually one more question.
Now I have two represent and riht now either one of them work but not
both. How I can combine them together ??

# Currency format
db.Product.List_Price.represent = lambda value, row: '$ %.2f' % (0.0
if value == None else value)

# text-align: right
db.Product.List_Price.represent = lambda value, row:
XML(DIV(value,_style='text-align: right;'))


On Sep 28, 10:37 am, Omi Chiba <ochib...@gmail.com> wrote:
> Wow ! This is what I want.
> Thanks !!
>
> On Sep 28, 9:53 am, Massimiliano <mbelle...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Is there a reason that you want to format on the grid?
>
> >  because you can do it in field.represent:
>
> > db.yourtable.yourfield = lambda value, row: '$ %.2f' % (0.0 if value == None
> > else value)
>
> > On Wed, Sep 28, 2011 at 4:48 PM, Omi Chiba <ochib...@gmail.com> wrote:
> > > Can we format 500.00 to $500.00 on smartgrid ?
>
> > --
> > Massimiliano

Reply via email to