I think this is transparent to jquery. Something like this?

#Model
db.define_table('person',Field('name'),Field('balance','double'))

#controller
def index(): return dict(people=db().select(db.person.ALL))

#view
{{extend 'layout.html'}}
<style>
.red { backrgound-color: red; }
.green {background-color: green; }
</style>
<table>
  {{for p in people:}}
  <tr>
     <td>{{=p.name}}</td>
     <td class="{{'red' if p.balance<0 else 'green'}}">{{=p.balance}}</
td>
  </tr>
  {{pass}}
</table>


On Feb 25, 11:57 pm, BrendanC <bren...@gmail.com> wrote:
> I'm interested in building a web2py demo that show color coded data in
> a (jquery?) datagrid. Ideally cells would be  color coded based on the
> underlying data value (e.g. neg values, overdue dates etc. in red).
> This type of display is pretty common in desktop apps, spreadsheets
> etc. but I have not found any web based examples ( which seems a bit
> odd - not sure why ).
>
> Are there any web2py examples of something like this?
>
> TIA,
> Brendan

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to