Hello all, I have a simple SQLFORM.smartgrid using two tables: "tramites" and "desarrollo_tramites":
<https://lh6.googleusercontent.com/-n3RmEWYCkP0/VLgYJVm42TI/AAAAAAAAYAI/FQU8KmqkrLQ/s1600/tramites.png> This is how the code looks like: @auth.requires_login() def consulta_tramite(): user_id = auth.user.id user_area = auth.user.area db.tramites.estado.writable = False db.tramites_procesos.tramite.writable = False db.tramites_procesos.usuario.default = user_id db.tramites_procesos.usuario.writable = False form = SQLFORM.smartgrid( db.tramites, linked_tables = ['tramites_procesos'], divider=' ⇒', fields=[ db.tramites.id, db.tramites.tiempo, db.tramites.documento_generado, db.tramites_procesos.id, db.tramites_procesos.tiempo, db.tramites_procesos.indicacion, db.tramites_procesos.usuario, db.tramites_procesos.area_destino, db.tramites_procesos.usuario_destino, db.tramites_procesos.comentarios ], editable=False, deletable=False, create=False, details=False, exportclasses=dict(xml=False, html=False, json=False, tsv=False, tsv_with_hidden_cols=False), maxtextlength=100, formstyle='bootstrap' ) if form.element('.web2py_table table'): form.element('.web2py_table table')['_class'] = 'table table-bordered' for tr in form.element('.web2py_table table tbody'): for td in tr.components: if 'Urgente' in td.components: td.add_class('warning warning-message') elif 'Muy Urgente' in td.components: td.add_class('danger danger-message') return dict(form=form) I want to add an extra column at the beginning of the table that shows the row count, something like this: # | Nº trámite | Fecha | ... =================== 1 | ... 2 | ... 3 | ... 4 | ... How can I achieve such thing? Thank you, César B. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.