To see 2 table grids without any relationship - return from controller:
return dict(grid1 = grid(..), grid2 = grid(..))
and render it in view:
{{=grid1}}
{{=grid2}}
For grid(..) syntax you already have examples here.
To see parent grid with links to children tables, use smartgrid
return dict(grid
Use grid = smartgrid()
to display table with links to children tables
Dne úterý, 20. května 2014 23:50:23 UTC+2 Juan Luis napsal(a):
thank you stifan, represent is what I needed to know and your example
worked perfect.
My primary problem is that i am not able to see my other table in
thank you stifan, represent is what I needed to know and your example
worked perfect.
My primary problem is that i am not able to see my other table in
SQLFORM.grid. Here I try to create two columns; one from db.contact and the
other from db.task.
Can my error be noticed?
On Tuesday, May
please try (not tested), the bold are the change of your initial code above
Model
db.define_table('contact',
Field('email',
*represent = lambda email, field: \A(email, _title = T(View
email), _target = _blank, _href = mailto:%s; % email) if email else ''*),
please try (not tested) :
Field('email', 'list:string', represent = lambda email, field: \
XML(, .join([A(mail, _title=T(Send to %s) % mail,
_target=_blank,
_href=mailto:%s; % mail).xml() for mail in
email] ) ) if email else ''),
5 matches
Mail list logo