Sorry I don't have an answer for you but can confirm that linked_tables are 
working fine for me in 2.2.1.

-Jim

On Monday, November 26, 2012 12:06:49 PM UTC-6, Cliff Kachinske wrote:
>
> Smartgrid isn't picking up linked tables in V 2.2.1.  Could I be missing 
> something obvious?  Any suggestions gratefully accepted.
>
>
> Here are three tables from my model.
>
> db.define_table(
>     'suppliers',
>     Field('name', length=256, required=True, notnull=True),
>     Field('address', length=64),
>     Field('address_2', length=64),
>     # details omitted
>     .... 
>     )
>
>
> db.define_table(
>     'supplier_contacts',
>     Field('supplier_id', db.suppliers),
>     Field('first_name', length=32, required=True, notnull=True),
>     # details omitted
>     ...
>     )
>
>
> db.define_table('product_suppliers',
>                 Field('product_id', db.products),
>                 Field('supplier_id', db.suppliers),
>                 Field('lead_time', 'integer',     # details omitted
>     )
>
>
> The smartgrid from this controller code fails to contain a link to 
> supplier_contacts.  Worse, if I add a linked_tables argument the grid 
> displays no links at all.
>
> def smartindex():
>     form = SQLFORM.smartgrid(
>             db.suppliers,
> ##            linked_tables = [
> ##                db.supplier_contacts
> ##                ],
>             # links_in_grid=True,
>             # fields=[db.suppliers.name],
>             )
>     return dict(form=form)
>
>
>
>
>
>

-- 



Reply via email to