Am 05.07.2011 09:15, schrieb [email protected]:
> I display a large amount of float values in my datagrid some stored in
> the database. Would it be possible to format these float values to
> display only 4 significant values when the DataGrid is rendered?

Sure, just use a custom getter function, like so:

my_grid = PaginateDataGrid(name='...',
    fields=[
        ...
        ('My Float Value',
            lambda d: '%.4g' % d.my_float_value, sortable),
        ...
    ])

-- Christoph

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to