please use dict() when you deal with smartgrid that reference to another 
table 
*e.g. not tested *
def dailycounts():
fields = dict(daily_counts = [db.daily_counts.add_date, 
db.daily_counts.encrypt_count, 
  db.daily_counts.decrypt_count, db.daily_counts.error_count, 
  db.daily_counts.directory_create_count, 
db.daily_counts.client_add_count], 
  history = [db.history.client_id_dc, db.history.add_date, 
db.history.encryption_type, 
 db.history.out_filename] )
orderby = dict(daily_counts = ~db.dalily_counts.add_date, history = 
~db.history.add_date)
# similar to create = False, but you can make it flexible e.g. daily_counts 
= True, history = False
create = dict(daily_counts = False, history = False)
# similar to editable = False, but you can make it flexible e.g. 
daily_counts = True, history = False
editable = dict(daily_counts = False, history = False)
# similar to deletable = False, but you can make it flexible e.g. 
daily_counts = True, history = False
deletable = dict(daily_counts = False, history = False)
    grid = SQLFORM.smartgrid(db.daily_counts, user_signature = False, 
create = create, editable = editable, 
 deletable = deletable, paginate = 10, orderby = orderby, fields = fields )
    return locals()

best regards,
stifan

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to