Size of SQLFORM.grid items

82 views
Skip to first unread message

Jitun John

unread,
Jun 13, 2016, 10:41:15 AM6/13/16
to web2py-users


Above is a simple SQL.grid I have used.
I added "headers={'store_log_stats.cluster_name' : 'Cluster______________________________Name'}," to make sure that the column had enough space.
But even with enough space, the data is concatenated.
Actual names are "Cluster-LH-P4530-13-14", "Cluster-LH-P4530-11-12"

Just wondering how to make sure the Cluster name is displayed in full.

Anthony

unread,
Jun 13, 2016, 11:12:16 AM6/13/16
to web2py-users
As per the documentation:

  • maxtextlength sets the maximum length of text to be displayed for each field value, in the grid view. This value can be overwritten for each field using maxtextlengths, a dictionary of 'tablename.fieldname':length e.g. {'auth_user.email' : 50}
Anthony

Jitun John

unread,
Jun 14, 2016, 5:46:05 AM6/14/16
to web2py-users
Thanks a lot Anthony. Works like Charm.

Sneka R

unread,
Jun 24, 2016, 4:59:39 PM6/24/16
to web2py-users
Where do we set the maxtextlength?

Anthony

unread,
Jun 24, 2016, 5:14:48 PM6/24/16
to web2py-users
It's an argument of SQLFORM.grid.

Sneka R

unread,
Jun 28, 2016, 11:22:53 AM6/28/16
to web2py-users
Thanks a lot.

Sneka R

unread,
Jun 28, 2016, 11:22:55 AM6/28/16
to web2py-users
Thanks a lot.
Reply all
Reply to author
Forward
0 new messages