Re: [web2py] SQLFORM.grid - questions/suggestions

2012-06-07 Thread Richard Vézina
Do you have the latest trunk? Because, web2py change rapidly... Richard On Thu, Jun 7, 2012 at 2:02 PM, Doug Philips wrote: > On 6/7/12, Richard Vézina wrote: > > I am almost sure I saw a email were Massimo explain how to set a > different > > text for "submit" button, can't find it back... >

Re: [web2py] SQLFORM.grid - questions/suggestions

2012-06-07 Thread Doug Philips
On 6/7/12, Richard Vézina wrote: > I am almost sure I saw a email were Massimo explain how to set a different > text for "submit" button, can't find it back... > > Have you try with SQLFORM attribute ? Or SQLFORM attribute with "_" before > : _submit_button = 'Submit' Well, I looked at the code i

Re: [web2py] SQLFORM.grid - questions/suggestions

2012-06-07 Thread Richard Vézina
I am almost sure I saw a email were Massimo explain how to set a different text for "submit" button, can't find it back... Have you try with SQLFORM attribute ? Or SQLFORM attribute with "_" before : _submit_button = 'Submit' Richard On Thu, Jun 7, 2012 at 1:20 PM, Doug Philips wrote: > I know

[web2py] SQLFORM.grid - questions/suggestions

2012-06-07 Thread Doug Philips
I know that SQLFORM.grid is marked experimental and thus I shouldn't expect it to be as refined as some of the other parts of web2py, but I'm hoping that also means it is still a bit open to adjustment? SQLFORM.grid has saved me a ton of work, but there are few things I wish it did slightly better

[web2py] sqlform.grid datable entry vew format

2012-05-27 Thread Marian Siwiak
Hello, I've got simple question, to which I cna't find simple answer. I formatted "View" of my entries, showing fields I want to show, hidin those I don't want to show. When I get page with "view" of the row of my datable, it starts with "form:" - how do I remove this? thanks in advance, Mar

[web2py] sqlform.grid html text

2012-05-26 Thread CtrlSoft
hi, how to display in sqlform.grid -> viewhtml formated text? i mean: *someText lazy** fox* instead ofsomeText lazy fox

Re: [web2py] SQLFORM.grid: sorting

2012-05-21 Thread Massimo Di Pierro
something like this? SQLFORM.grid(db.table1.field1==db.table2.id,fields=db.table1.ALL,orderby=db.table2.field2) smartgrid cannot do this. On Monday, 21 May 2012 15:24:23 UTC-5, backseat wrote: > > Thanks Jim, I somehow missed the 'orderby' parameter to SQLFORM.grid > > On Mon, 21 May 2012 13:11

Re: [web2py] SQLFORM.grid: sorting

2012-05-21 Thread Jim Steil
Massimo - Is there a way to do it with a .smartgrid. I know the question wasn't on .smartgrid, but I'm using that extensively and too would like some sort of solution. -Jim On 5/21/2012 3:11 PM, Massimo Di Pierro wrote: foreign key. You can do a join. On Monday, 21 May 2012 14:49:06 UTC

Re: [web2py] SQLFORM.grid: sorting

2012-05-21 Thread Keith Edmunds
Thanks Jim, I somehow missed the 'orderby' parameter to SQLFORM.grid On Mon, 21 May 2012 13:11:31 -0700 (PDT), massimo.dipie...@gmail.com said: > foreign key. You can do a join. Thanks Massimo; however, that's a little cryptic. Could you explain how a join can be used to determine the sort order

Re: [web2py] SQLFORM.grid: sorting

2012-05-21 Thread Massimo Di Pierro
foreign key. You can do a join. On Monday, 21 May 2012 14:49:06 UTC-5, Jim S wrote: > > You can specify the sort order using the orderby parameter. But, I > don't know how you get it to sort by the displayed value of a foreign > key column. > > Ex: > > orderby = [~db.asset.acquiredOn, db.asse

Re: [web2py] SQLFORM.grid: sorting

2012-05-21 Thread Jim Steil
You can specify the sort order using the orderby parameter. But, I don't know how you get it to sort by the displayed value of a foreign key column. Ex: orderby = [~db.asset.acquiredOn, db.asset.assetTag, db.asset.description] ~ orders descending. -Jim On 5/21/2012 2:23 PM, Keith Edmun

[web2py] SQLFORM.grid: sorting

2012-05-21 Thread Keith Edmunds
Two questions re SQLFORM.grid sorting. 1. Is it possible to specify the initial sort order? 2. I'm displaying a table that includes a foreign field. When I click on the header to sort by that field, it sorts by the field id rather than by the (displayed) foreign field. Can I sort by the displaye

[web2py] SQLFORM.grid import

2012-05-19 Thread Jonathan Lundell
It'd be convenient, I think, to have an SQLFORM.grid import button that imported what the export button exports (csv). Granted that the admin interface can be used for this, but for a couple of my tables it'd be handy to be able to enable an import button if, say, the table is empty.

Re: [web2py] SQLFORM.grid edit form

2012-05-01 Thread Jim Steil
I see a couple ways to handle it. 1. Using a custom view, wrap the button html with an if statement testing to see if request.args(1) == 'edit'. If so, then you are in the edit form for the grid. 2. Specify a custom view based on request.args(1) == 'edit' and then code the entire thing using

[web2py] SQLFORM.grid edit form

2012-04-30 Thread Keith Edmunds
I have a SQLFORM.grid, and I want to add a button to the form used to edit records (as called from the grid). Is that possible? -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar. Who did you help today?

[web2py] SQLFORM.grid, links and buttons placement specification (before other columns, after, or both)

2012-04-17 Thread nikos
Hello there follow web2py users, First of all, Massimo, thanks for the great work you have done to get web2py to this high level of functionality. I recently started using it for a project and was faced with a challenge: in SQLFORM.grid, when a table has many fields, the users have to scroll to

[web2py] SQLFORM.grid Links question

2012-04-13 Thread greenpoise
Based on this: links = [lambda row: INPUT(_name='qty', _value='1'), lambda row: A('+', callback=URL('cart_callback',vars=dict(id=row.id,action='add',qt=request. vars.qty)))] Is there a way to grab the value of the INPUT to pass them to another function??? qt=request.vars.qty does not cut it.

[web2py] SQLFORM.grid pagination

2012-04-10 Thread Keith Edmunds
I have a SQLFORM.grid that says "67 records found", and shows the first 20 (as I would expect). At the bottom, there are four buttons for the pages (1-4). If I click on any of 2, 3 or 4, I get "No records found". Looking deeper, the URL of the first page is http://127.0.0.1:8000/app/repor

[web2py] SQLFORM.grid(col3)?

2012-04-05 Thread Jonathan Lundell
Is there any reason not to have a col3 argument to SQLFORM.grid, and pass it to the create/edit SQLFORMs? Likewise comments. Or maybe just an sqlform argument dict to be passed as additional kwargs?

Re: [web2py] SQLFORM.grid not doing what I want :)

2012-03-30 Thread Mike Veltman
After testing form = SQLFORM.grid(query, fields=fields, field_id=db.lvdisksetup.id, <--- orderby=['lvdisksetup.lunid'], csv=False, create = True, maxtextlength=45 ) It worked like a ch

Re: [web2py] SQLFORM.grid not doing what I want :)

2012-03-30 Thread Mike Veltman
I guessed it was something like that :-) Thanks Massimo I am going to test it. On 03/30/2012 10:51 AM, Massimo Di Pierro wrote: You have to pass it SQLFORM.grid(...,field_id=db.lvdisksetup.id,) else it does not know what table to use. On Thursday, 29 March 2012 19:58:52 UTC-5, Gwayne ak

Re: [web2py] SQLFORM.grid not doing what I want :)

2012-03-29 Thread Massimo Di Pierro
You have to pass it SQLFORM.grid(...,field_id=db.lvdisksetup.id,) else it does not know what table to use. On Thursday, 29 March 2012 19:58:52 UTC-5, Gwayne aka Mike Veltman wrote: > > On 03/30/2012 12:01 AM, Massimo Di Pierro wrote: > > When you say "I want to manipulate db.lvdisksetup b

Re: [web2py] SQLFORM.grid not doing what I want :)

2012-03-29 Thread Mike Veltman
On 03/30/2012 12:01 AM, Massimo Di Pierro wrote: When you say "I want to manipulate db.lvdisksetup but in stead it manipulates db.lvdisk" what do you mean by "manipulates"? That when I delete a record or do add a record it gives me the db.lvdisk table and not the db.lvdisksetup table. So I

Re: [web2py] SQLFORM.grid not doing what I want :)

2012-03-29 Thread Massimo Di Pierro
When you say "I want to manipulate db.lvdisksetup but in stead it manipulates db.lvdisk" what do you mean by "manipulates"? On Wednesday, 28 March 2012 22:58:31 UTC-5, Gwayne aka Mike Veltman wrote: > > Gentle people, > > I have the following grid: > > query = ( (db.lvdisksetup.lvgroupname_

[web2py] SQLFORM.grid not doing what I want :)

2012-03-28 Thread Mike Veltman
Gentle people, I have the following grid: query = ( (db.lvdisksetup.lvgroupname_id == usedlvdisksetup) & (db.lvgroupname.id == usedlvdisksetup) & (db.lvdisksetup.lvdisk_id == db.lvdisk.id) ) fields = [db.lvdisksetup.id, db.lvgroupname.lvgroupnamedesc , db.lvdisk.lvdiskdesc, db.lvdisksetup

[web2py] SQLFORM.grid not doing what I expect

2012-03-28 Thread Mike Veltman
Gentle people, I have the following grid: query = ( (db.lvdisksetup.lvgroupname_id == usedlvdisksetup) & (db.lvgroupname.id == usedlvdisksetup) & (db.lvdisksetup.lvdisk_id == db.lvdisk.id) ) fields = [db.lvdisksetup.id, db.lvgroupname.lvgroupnamedesc , db.lvdisk.lvdiskdesc, db.lvdisksetup

[web2py] SQLFORM.grid many2many name of referenced table instead of id

2012-03-23 Thread jep
Is it possible to show the referenced name field, instead of the id when showing a grid of a many2many table? my model: tsmadm.define_table('report_contact', Field ('report_id', db.reports, requires=IS_IN_DB(db, db.reports.id,'%(name)s') ), Field ('contact_id', db.contact

[web2py] SQLForm.grid : is it possible to delete multiple rows at once ?

2012-03-23 Thread sebsto
Hello, Is it possible to select and delete multiple rows with one button click using SQLFORM.grid ? (instead of clicking delete on each row) I tried the "selectable" property but this doesn't help to delete. I searched the archive of this group / mailing-list without success Thanks for your hel

[web2py] SQLForm.grid : how to change the way column are rendered

2012-03-22 Thread sebsto
Hello, I just discovered SQLForm.grid ! Waow, geat job !! I'd like to customize some columns in the generated table. Example use case : - Use the pretty date formatting instead of displaying the raw date ("yesterday", etc ...) - Use an icon instead of a status flag. Is it possible ? How to

[web2py] SQLFORM.grid search using signature

2012-03-19 Thread Gian Luca Decurtins
Hi all I can't perform search operations on SQLFORM.grid forms. If I remove the "@auth.requires_signature()" part, it does work. In the webserver-logfile I noticed that the edit page is signed, while the search page isn't. EDIT: /init/location/form/edit/location/4?_signature=368187847e306b826b

[web2py] SQLFORM.grid, selectable and id

2012-03-12 Thread Johann Spies
When using the following grid: query = ((db.akb_authors.id.belongs(ids))& (db.akb_authors_article_link.author == db.akb_authors.uuid)& (db.akb_authors_article_link.article == db.akb_articles.uuid)& (db.akb_journal.uuid == db.akb_articles.journal)) lef

[web2py] sqlform.grid search widget

2012-03-07 Thread peter
As I have commented before, sqlform.grid has a particular way of searching. Its combination of search and 'queries' is very powerful. However the search does not really work in the way a casual web user might expect. If entered - Bob Dylan - in the search box and clicked search, then one get 'inval

[web2py] Re: Any way to make web2py SQLFORM.grid accept inserted fields?

2012-02-21 Thread whowhywhat
turning the dict > if form[0].process(onvalidation=add_my_field) > On Feb 21, 10:09 am, whowhywhat wrote: > > > > > > > > > anybody .. please .. pretty please :).. > > > On Feb 21, 10:20 am, whowhywhat wrote: > > > > I need a web2py SQLFORM.

[web2py] Re: Any way to make web2py SQLFORM.grid accept inserted fields?

2012-02-21 Thread Cliff
ody .. please .. pretty please :).. > > On Feb 21, 10:20 am, whowhywhat wrote: > > > > > > > > > I need a web2py SQLFORM.grid to accept and process based on some > > conditions, which need to be triggered based on some check boxes. I > > have inserted t

[web2py] Re: Any way to make web2py SQLFORM.grid accept inserted fields?

2012-02-21 Thread whowhywhat
anybody .. please .. pretty please :).. On Feb 21, 10:20 am, whowhywhat wrote: > I need a web2py SQLFORM.grid to accept and process based on some > conditions, which need to be triggered based on some check boxes. I > have inserted these checkboxes into the form by doing something like

[web2py] Any way to make web2py SQLFORM.grid accept inserted fields?

2012-02-20 Thread whowhywhat
I need a web2py SQLFORM.grid to accept and process based on some conditions, which need to be triggered based on some check boxes. I have inserted these checkboxes into the form by doing something like : In the controller - def my_grid(): form = SQLFORM.grid() if len(request.args)>1

Re: [web2py] Sqlform.grid search

2012-02-04 Thread Michele Comitini
Suppose you have a table: db.define_table('book', Field('author', 'string'), Field('title', 'string'), Filed('description', 'text')) you can search like this: author is "cormac mccarthy" and title contains "horses" mic 2012/2/4 peter : > SQLFORM.grid's search box seems to only work with sing

[web2py] Sqlform.grid search

2012-02-04 Thread peter
SQLFORM.grid's search box seems to only work with single word search terms. Has anyone looked into it working with multiple words, working as if they are 'and'ed together?

[web2py] SQLFORM.grid: search and links

2012-01-29 Thread backseat
I've a couple of questions about SQLFORM.grid: - Is it possible to position the buttons/links created by the 'links' argument somewhere other than the end of the row? It feels as if the 'fields' argument should be able to do this, but I can't see how. - Is it possible for the 'search' box to

Re: [web2py] SQLFORM.grid order

2012-01-16 Thread Johann Spies
On 16 January 2012 23:03, Miguel wrote: > Hello, > > I have a question about SQLFORM.grid order of the fields in the table > represented? > > Is there any way to modify the order of these fields in a > SQLFORM.grid? > > The initial order can be determined in orderby = . The displayed grid's orde

[web2py] SQLFORM.grid order

2012-01-16 Thread Miguel
Hello, I have a question about SQLFORM.grid order of the fields in the table represented? Is there any way to modify the order of these fields in a SQLFORM.grid? Thanks Miguel

[web2py] SQLFORM.grid links

2012-01-16 Thread Miguel
Hello, I have defined two tables related between each other, I have defined a SQLFORM.grid with this two tables and works ok, but when I try to add a new button with the id parameter it fails, but when I use other field like name works correctly. db.define_table('course', Field('name','strin

[web2py] SQLFORM.grid and custom display values from fields not displayed in the table.

2012-01-13 Thread Robert Clark
Can I first say that SQLFORM.grid is great and a massive productivity gain, thanks Massimo & the rest of the web2py team. My question is around formatting a column when the display value depends on other non-visible columns (or other related tables). We're using the "links" parameter and a lambda

[web2py] SQLFORM.grid ignore_rw option

2011-12-28 Thread Dariel Dato-on
Hello! When I pass the 'ignore_rw=True' to SQLFORM.grid(), not all the fields are displayed in the grid. The fields that are set to 'readable=False' are not displayed in the grid. Is this the correct behavior? If so, how can I modify it? Thanks!

[web2py] SQLFORM.grid short strings

2011-12-19 Thread Nicolas Palumbo
When doing this the assignee, summary and dependencies columns are trunc [shortened]. How can I prevent this to happen? This is the code: db.buglist.insert(bug_id=bugid,dependencies=deps,sev=severity, prio=priority, assignee=assigned_to, status=bug_status, summary=short_desc) gri

[web2py] SQLFORM.grid custom labels in edit form for each row

2011-12-16 Thread brushek
Hello, I would like to have images instead of text (or text AND image) in each label for row, when I click edit in form generated by SQLFORM.grid. How to do this in easiest way ? Regards brushek

[web2py] SQLFORM.grid and query

2011-12-16 Thread JmiXIII
I have a problem using SQLFORM.grid and a query from a FORM: Here is my controller def synthese(): ListeFamille=db(db.ATPOSTE.id>0).select(orderby=db.ATPOSTE.PS_FAMI) selection=FORM(TABLE(TR( TD('Début',INPUT(_name='Deb',id="1",_class="date", requires = IS_DATE(error_messa

[web2py] SQLFORM.grid - get rid of 'id'

2011-12-07 Thread Martin Weissenboeck
How can I get rid of the "id"-column when editing one row of a grid? Regards, Martin

[web2py] SQLFORM.grid and query

2011-12-01 Thread peter
I am using SQLFORM.grid. I have a boolean field todo. If I select this in query, and select True as the value, nothing happens. If I click 'query' it simply resets the query. If I click 'search', it too clears the query, and finds all the records. How can I get it to find only the records with

Re: [web2py] SQLForm.grid - How do I use it properly?

2011-11-21 Thread Nik Go
try this : ,links = [lambda row: A( SPAN(_class='icon magnifier') ,'View Post' ,_class='button',_title='View Post' ,_href=URL(args=["view", db.person, row.id]) ) ] On Monday, November 21, 2011, Rahul wrote: > Hi Johann, > That is correct but I just wanted

[web2py] sqlform.grid and sqlform.smartgrid archived table for record versioning

2011-11-19 Thread 黄祥
hi, is it possible for sqlform.grid and sqlform.smartgrid use the archive table for record versioning? i tried to use the sqlform.grid and sqlform.smartgrid with record versioning but returned an error : AttributeError: 'DIV' object has no attribute 'process' my controller is : def index():

Re: [web2py] SQLFORM.grid: show reference table

2011-11-14 Thread Jim Steil
Here's what I would do. (not tested) db.define_table('Model', Field('Name'), Field('Unit'), format='%(name)s') -Jim On 11/14/2011 4:55 PM, Omi Chiba wrote: I want to show the reference field value ('Name' in Model table) on the grid instead of the original value (Model_ID in P

[web2py] SQLFORM.grid: show reference table

2011-11-14 Thread Omi Chiba
I want to show the reference field value ('Name' in Model table) on the grid instead of the original value (Model_ID in Product table). Is there easy way to do it ? Controller --- def admin(): db.Product.id.readable = False products = SQLFORM.grid(db.Product,create=Fa

Re: [web2py] SQLForm.grid - How do I use it properly?

2011-11-14 Thread Jim Steil
Ok, columns are gone again... Might just be best to stick with using fields. -Jim On 11/14/2011 8:47 AM, Jim Steil wrote: I stand corrected on the 'columns' comment. Massimo added it back in this morning. -Jim On 11/14/2011 8:45 AM, Jim Steil wrote: here are a few thoughts... 1.

Re: [web2py] SQLForm.grid - How do I use it properly?

2011-11-14 Thread Jim Steil
I stand corrected on the 'columns' comment. Massimo added it back in this morning. -Jim On 11/14/2011 8:45 AM, Jim Steil wrote: here are a few thoughts... 1. Make sure you create this test in a new app. If you're updating or adding functionality to an already existing app, then your l

Re: [web2py] SQLForm.grid - How do I use it properly?

2011-11-14 Thread Jim Steil
here are a few thoughts... 1. Make sure you create this test in a new app. If you're updating or adding functionality to an already existing app, then your layout and base.css need to be updated. 2. If using jquery-ui, then you need to download jquery-ui and include it in your layout.html w

[web2py] SQLForm.grid - How do I use it properly?

2011-11-14 Thread Rahul
Hi All, Can anyone let me know how to use SQLForm.grid properly or tell me what I am missing. I have not installed any jquery plugin for the same (assuming that it is part of 1.99.2 by default). I cannot see the complete grid, just some buttons and data as per my query below. Also the links d

Re: [web2py] SQLFORM.grid - columns arg is gone

2011-11-10 Thread Jim Steil
Here is the change I made in my code to accommodate: Old code: columns=['assetType.name'] New code: fields=[db.assetType.name] Other than that, seems like they work the same. Can anyone provide a deeper explanation of the differences? -Jim On 11/10/2011 9:17 AM, Jim Steil wrote: Hi

[web2py] SQLFORM.grid - columns arg is gone

2011-11-10 Thread Jim Steil
Hi I just updated my web2py from trunk today and noticed that the columns arg in SQLFORM.grid is gone. I was using it to specify which fields to display in my grid. Can the 'fields' arg be used the same as columns? -Jim

Re: [web2py] SQLFORM.grid : formstyle, readable and writable control

2011-11-09 Thread Jim Steil
From what I can gather, smartgrid is the same as grid except that it will also display/work with related tables. Grid works with one table only (please correct me if I'm wrong). -Jim On 11/9/2011 3:14 PM, Richard Vézina wrote: Thank a lot Jim I will play a bit with your example... Pretty

Re: [web2py] SQLFORM.grid : formstyle, readable and writable control

2011-11-09 Thread Richard Vézina
Thank a lot Jim I will play a bit with your example... Pretty helpful... I would like to know more about the difference between grid and smartgrid... I just start to read the sqlhtml.py to understand better new grid and smartgrid... Thanks again. Richard On Wed, Nov 9, 2011 at 4:07 PM, Jim Stei

Re: [web2py] SQLFORM.grid : formstyle, readable and writable control

2011-11-09 Thread Jim Steil
Here is a sample of one of my controllers. @auth.requires_permission('select', db.priceTemplate) def priceTemplates(): response.view='list.html' table = db.priceTemplate response.title = '%s - %s' % (response.section, table['_plural']) columns = ['priceTemplate.name', 'priceTempla

[web2py] SQLFORM.grid : formstyle, readable and writable control

2011-11-09 Thread Richard
Hello, I would like to know I can control generated form with SQLFORM.grid... I use to do extensively : If user and group and permission and row field value: crud.table.field.readable =\ crud.table.field.writable =False form = crud.create, read or update(db.table) And I customize my for

[web2py] SQLFORM.grid and query

2011-11-08 Thread JmiXIII
Hello, I have something like: selection=FORM(TABLE(TR( TD('Début',INPUT(_name='Deb'), _class="date", requires = IS_DATE(error_message=T('Doit être de la forme -MM-JJ !'))), TD('Fin',INPUT(_name='Fin',_class="date", requires = IS_DATE(error_message=T('Doit

[web2py] sqlform.grid

2011-11-08 Thread JmiXIII
Hello, I have something like: selection=FORM(TABLE(TR( TD('Début',INPUT(_name='Deb'),_class="date", requires = IS_DATE(error_message=T('Doit être de la forme -MM-JJ !'))), TD('Fin',INPUT(_name='Fin',_class="date", requires = IS_DATE(error_message=T('Doit

Re: [web2py] sqlform.grid

2011-11-03 Thread Nik Go
If you wish to use the icons from the CSS templates just add: SPAN(_class='check icon') like this custom button: links = [lambda row: A(SPAN(_class='check icon') ,'Byte Me' ,_class='button' ,_title='Byte Me' ,_href=URL(args=["view", db.person, row.id]) )] Read the On Saturday, October 2

[web2py] SQLFORM.grid columnas a mostrar

2011-11-02 Thread mmartinez
Hello list. My question is this, I have a join in my query to the database, you need to show the columns belonging to tables and routes accountcode, here is my code: left = (db.accountcode.on(db.llamados.id_accountcode==db.accountcode.id),db.rutaproveedor.on(db.llamados.id_rutaproveedor==db.rutap

Re: [web2py] SQLFORM.grid collection of posts

2011-10-31 Thread Javier Pepe
Nick I'm use the attribute _class to make a button A('Detalle',_class='button',_href='index/detalle/%s' % row.id) This class render a button, same a the buttons on grid. On Fri, Oct 28, 2011 at 11:08 PM, Nik Go wrote: > It mentions: "If you use jqueryui then the links are rendered as butto

Re: [web2py] sqlform.grid

2011-10-28 Thread Nik Go
That's nice Peter. Good work! Thanks for sharing. On Wednesday, October 26, 2011, peter wrote: > I am using and enjoying sqlform.grid. I have the latest version of > web2py, however, I think that the css files within my application have > become out of date. > > If I have ten pages, then the pag

Re: [web2py] SQLFORM.grid awesomeness and some questions

2011-10-28 Thread Nik Go
Johan, we're you able to specify your own icons for your custom buttons? If so, may I know how you did it? On Thursday, October 27, 2011, Johann Spies wrote: > > > On 26 October 2011 19:15, Cliff 'cvml', 'cjk...@gmail.com');>> wrote: > >> So you need a column on the right for an "Add to Cart" bu

Re: [web2py] sqlform.grid and represent vs. format

2011-10-28 Thread Nik Go
I experience the same unexpected behavior. On Friday, October 28, 2011, szimszon wrote: > I have to tables > > db.define_table( 'wdirs', > Field( 'name', type = 'string', > requires = IS_NOT_EMPTY()), > *(a)* *format='%(name)s %(id)s'* > ) > > db.define_table( 'files',

Re: [web2py] SQLFORM.grid collection of posts

2011-10-28 Thread Nik Go
It mentions: "If you use jqueryui then the links are rendered as buttons. " am still trying to find an answer about how to use icons for your custom buttons. On Friday, October 28, 2011, Cliff wrote: > I'll try to keep an eye on it. > > On Oct 27, 1:47 pm, Massimo Di Pierro > > > > wrote: > >

[web2py] sqlform.grid and represent vs. format

2011-10-28 Thread szimszon
I have to tables db.define_table( 'wdirs', Field( 'name', type = 'string', requires = IS_NOT_EMPTY()), *(a)* *format='%(name)s %(id)s'* ) db.define_table( 'files', Field( 'wdirs_id', db.wdirs, requires = IS_IN_DB( db, db.wdirs.id, "%(name)s

[web2py] SQLFORM.grid behavior with an empty table

2011-10-27 Thread Bob St John
using 1.99.2 SQLFORM.grid... I don't see the need for this statement... line 1641: if not searchable and not rows: return DIV(T('No records found')) If it was removed a user would see an empty grid rather than just a div, no matter what the value of 'searchable' was. An empty grid allows the u

Re: [web2py] sqlform.grid

2011-10-27 Thread Richard Vézina
Many thanks Bruno I was digging into the appadmin trying to get the overflow stuff and putting it into my test view function. With Datatables I didn't use overflow since a wild... Thanks again. Richard On Thu, Oct 27, 2011 at 4:04 PM, Bruno Rocha wrote: > > > On Thu, Oct 27, 2011 at 5:51 PM,

Re: [web2py] sqlform.grid

2011-10-27 Thread Bruno Rocha
On Thu, Oct 27, 2011 at 5:51 PM, Richard Vézina wrote: > Hello Bruno, > > I am giving a ride to new SQLFORM.grid actually... And I wonder if there is > a way to have a scroll bar for big table (large table)? Do I have to use > jQuery UI? > > If so is there a predefined way of doing it? > Include

Re: [web2py] sqlform.grid

2011-10-27 Thread Richard Vézina
Hello Bruno, I am giving a ride to new SQLFORM.grid actually... And I wonder if there is a way to have a scroll bar for big table (large table)? Do I have to use jQuery UI? If so is there a predefined way of doing it? Richard On Tue, Oct 25, 2011 at 4:53 PM, Bruno Rocha wrote: > The grid css

[web2py] SQLFORM.grid sorting dates

2011-10-27 Thread peter
If one clicks on 'data modified' in a windows folder, the files are ordered with the most recent first. In SQLFORM.grid if one has a column with a date in it, and one clicks on the heading, they are sorted with the oldest first. See www.ukjazz.net/store/albums It would be nice if SQLFORM.grid ac

[web2py] SQLFORM.grid ondelete possible bug

2011-10-26 Thread Bob St John
using 1.99.2 in gluon.sqlhtml.SQLFORM.grid: line 1489: return ondelete(table,request.args[-2],ret) I think it should be: return ondelete(table,request.args[-1],ret) As it is now, ondelete gets (table, table, ret), whereas I believe it should get (table, record_id, ret) to work properly... I li

[web2py] SQLFORM.grid collection of posts

2011-10-26 Thread Cliff
You can find a digest of posts about SQLFORM.grid here: https://docs.google.com/document/d/1p-OXDn75Nt2qmXQ0lvjqr4tYIf2PTIQx6hPegT1AV1Q/edit I know it is not complete, but it may help you get started. Also there is some good information in the source file: gluon/ sqlhtml, Just looking at the si

[web2py] SQLFORM.grid awesomeness and some questions

2011-10-26 Thread Cliff
SQLFORM.grid is amazing. Many thanks Massimo, Bruno, Martin and everyone involved. Is there a way to replace the contents of the tag at the top of the view? All the pages show "Index." This is okay for the index view, but I would like to change it to "Edit", "View" and so on. Do the "design",

Re: [web2py] sqlform.grid

2011-10-25 Thread Bruno Rocha
The grid css is in base.css, but if you do not want to mess your own css, open the file and copy only the grid part. it is commented. On Tue, Oct 25, 2011 at 6:46 PM, peter wrote: > I am using and enjoying sqlform.grid. I have the latest version of > web2py, however, I think that the css files w

[web2py] sqlform.grid

2011-10-25 Thread peter
I am using and enjoying sqlform.grid. I have the latest version of web2py, however, I think that the css files within my application have become out of date. If I have ten pages, then the page numbers appear vertically rather than horizontally at the bottom of the table. What css files do I need

[web2py] SQLFORM.grid / Powergrid

2011-10-20 Thread greenpoise
I have a few questions regarding the grids. 1. Is SQLFORM.grid the implementation of Powergrid? meaning, does SQLFORM.grid has all the features of Powergrid? 2. Is there an option to edit a value on the fly rather than using an edit button? sort of like edit in place pyslice. 3. Is search as you

Re: [web2py] SQLFORM.grid() problem - latest trunk

2011-10-07 Thread Jim Steil
FYI - Created a whole new install of web2py from trunk and my problem went away. Sorry for the noise... -Jim On 10/6/2011 3:25 PM, Jim Steil wrote: Hi I installed the latest from trunk today and am now getting the following. Traceback(most recent call last): File"C:\dev\web2py\gluon\

[web2py] SQLFORM.grid() problem - latest trunk

2011-10-06 Thread Jim Steil
Hi I installed the latest from trunk today and am now getting the following. Traceback(most recent call last): File"C:\dev\web2py\gluon\restricted.py",line194,inrestricted execccodeinenvironment File"C:/dev/web2py/applications/FoodPantry/controllers/default.py"

[web2py] SQLFORM.grid Errors With Latest Commit

2011-09-28 Thread Ross Peoples
The following commit has caused an error when columns/fields are not specified: http://code.google.com/p/web2py/source/detail?r=48e6f24a4ed36bb35bcd3f37e9ebc955dc9868a1 I have been trying to figure out where this error has been coming from and finally narrowed it down. Here is the code I have b

[web2py] SQLFORM.grid: Search only startswith

2011-09-27 Thread Omi Chiba
For example, I have a field which has 'abcab' and 'bcabc' data. If I provide 'ab' in the search box, I want to just pull the first one ('abcab') and exclude second one ('bcabc'). Can we do this ? models/db.py - db.define_table('Product', Field('Part_Number')) controllers/

[web2py] SQLFORM.grid Natural Language Queries

2011-09-23 Thread Ross Peoples
This is a very cool feature! However, I don't think regular users will know how to use this. For one, you have to know the field names. You have to know that "First Name" is actually "first_name" and that "E-mail" is actually "email". Is there a way to make these queries easier for users? Maybe

Re: [web2py] SQLFORM.grid representation

2011-09-13 Thread Jim Steil
Is it possible that this is a bug? (I don't have the expertise/confidence to say it is definitely a bug).I duplicated your example and can reproduce your results. But, if I go through appadmin and list out my table the owner name does appear. -Jim On 9/12/2011 9:51 PM, Simon Ashley

[web2py] SQLFORM.grid representation

2011-09-12 Thread Simon Ashley
Have a Model as follows: from gluon.tools import Auth auth=Auth(db) auth.define_tables() db.define_table('person',Field('name'),format='%(name)s') db.define_table('dog',Field('name'),Field('owner',db.person)) db.dog.owner.requires = IS_IN_DB(db, 'person.id', db.person._format) and a controller:

<    1   2   3   4