[web2py] Re: SQLFORM.grid 'headers' doesn't change column header

2013-03-27 Thread Andrii Pitukh
Works perfectly, thanks!

On Tuesday, March 26, 2013 1:39:00 PM UTC+2, Niphlod wrote:

 SQLFORM.grid takes the labels from the underlying model, so as long as 
 you specify the label before calling the grid, you're fine.

 db.table1.field1.label = 'whatever'
 grid = SQLFORM.grid(db.table1)

 should work.

 On Tuesday, March 26, 2013 12:07:29 PM UTC+1, Andrii Pitukh wrote:

 Can you write a code example?  SQLFORM constructor has 'labels' 
 parameter, but  SQLFORM.grid doesn't have it.

 On Tuesday, March 26, 2013 12:20:10 PM UTC+2, Niphlod wrote:

 the form has normally the label of that field . headers are for the 
 table representation only

 On Tuesday, March 26, 2013 11:01:03 AM UTC+1, Andrii Pitukh wrote:

 I created the following form:

 SQLFORM.grid(dbm.groups_subjects, headers={'table1.field1':T('Myname1'))

 The names of columns that are set in headers are shown correctly (I see 
 *Myname1* as header). But when I press view or create, I see '*field1*' 
 as column header instead of *'Myname1'*



-- 

--- 
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/groups/opt_out.




[web2py] SQLFORM.grid 'headers' doesn't change column header

2013-03-26 Thread Andrii Pitukh
I created the following form:

SQLFORM.grid(dbm.groups_subjects, headers={'table1.field1':T('Myname1'))

The names of columns that are set in headers are shown correctly (I see *
Myname1* as header). But when I press view or create, I see '*field1*' as 
column header instead of *'Myname1'*

-- 

--- 
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/groups/opt_out.




[web2py] Re: SQLFORM.grid 'headers' doesn't change column header

2013-03-26 Thread Andrii Pitukh
Can you write a code example?  SQLFORM constructor has 'labels' parameter, 
but  SQLFORM.grid doesn't have it.

On Tuesday, March 26, 2013 12:20:10 PM UTC+2, Niphlod wrote:

 the form has normally the label of that field . headers are for the 
 table representation only

 On Tuesday, March 26, 2013 11:01:03 AM UTC+1, Andrii Pitukh wrote:

 I created the following form:

 SQLFORM.grid(dbm.groups_subjects, headers={'table1.field1':T('Myname1'))

 The names of columns that are set in headers are shown correctly (I see *
 Myname1* as header). But when I press view or create, I see '*field1*' 
 as column header instead of *'Myname1'*



-- 

--- 
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/groups/opt_out.




[web2py] How to add field to SQLFORM.grid

2013-03-12 Thread Andrii Pitukh

Hi. I need to add field (column) to the SQLFORM.grid. The column is simple 
order number – just numbers 1,2,3,4,... at the beginning of every row. 
Also, as you can see, this field should NOT be viewed in update or create 
mode. I'm sure there should be way to accomplish this.
Thanks in advance for any help

-- 

--- 
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/groups/opt_out.