[web2py] Grid: case insensitive sort

2022-11-03 Thread Vincent Borghi
Hello, I have a simple SQLFORM.grid that shows the rows of my simple SQLite database. In the grid, when I click on, say, the "vendorname" column header, this performs a kind of alphabetical sort, but the sort is case sensitive, so for example "AXE" comes before "Abc". How can I make the grid ac

[web2py] Web2py grid with no formname or formkey

2021-11-05 Thread Shaun Smith
Hi guys Is it possible to create a grid without a formname and key? I am experimenting with service workers and offline mode and there are some intricacies regarding service workers and POST requests I am unfamiliar with and want to get a better understanding of. My current understanding is t

Re: [web2py] Re: Freshly cloned web2py, grid example says "not authorized"

2020-09-22 Thread AGRogers
Yes, I got bitten by this too. My opinion is that this decorator (and others like it) should start commented out. These little obstacles can make those first weeks unnecessarily harder. On Wed, 23 Sep 2020, 1:18 pm BigBaaadBob, wrote: > Yes, thanks. I’m just surprised this doesn’t work In the We

[web2py] Re: Freshly cloned web2py, grid example says "not authorized"

2020-09-22 Thread BigBaaadBob
Yes, thanks. I’m just surprised this doesn’t work In the Welcome application out of the box. I’m not writing a new application; I’m just clicking on the buttons provided in unchanged freshly cloned code. On Tuesday, September 22, 2020 at 11:04:00 AM UTC-7 Константин Комков wrote: > Hello! You n

[web2py] Re: Freshly cloned web2py, grid example says "not authorized"

2020-09-22 Thread Константин Комков
Hello! You need to comment decorator #@auth.requires_membership('admin') or add your user in 'admin' group see chapter 9 Access Control in The book. Also set table name, forexample: tablename = 'auth_user' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github

[web2py] Freshly cloned web2py, grid example says "not authorized"

2020-09-22 Thread BigBaaadBob
I just now cloned (recursive) the web2py distro, started it, and clicked on the "grid example" button in the welcome application. I then registered when asked to authenticate. I got redirected back to the welcome app index page. I then click on the "grid example" button again and I get "Not aut

[web2py] grid reloading the page on grid actions (and keeping the page's arguments)

2020-04-24 Thread Vlad
I've got a page with a grid on it. grid reloads the page on create and other actions. the page to begin with has arguments, for example, page/1/2/3. I want the grid to keep these 1/2/3 in place when reloading the page on those actions, for example, on new record it should use page/1/2/3/new in

[web2py] Grid sorting sorts by id (in case of a FK) instead of shown value (eg. name). Is this normal?

2019-04-29 Thread jcrmatos
Grid sorting sorts by id (in case of a FK) instead of shown value (eg. name). Is this normal? The only way I found to correct this behavior was to change the grid's table to a query, where in this query I include all the foreign fields (eg. name) directly and remove al the foreign keys. Is this

[web2py] Grid search collects all records from all fields on each request. Isn't this bad for performance?

2019-04-29 Thread jcrmatos
Grid search collects all records from all fields on each request. Isn't this bad for performance? Isn't it possible to change this behavior to only load the records when the user selects a specific field to do the search? -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

[web2py] Grid search and clear buttons don't restore request.args. Where can I correct that?

2019-04-29 Thread jcrmatos
Grid search and clear buttons don't restore request.args. Where can I correct that? If using master-child pages, the master grid search works fine (because there are no request.args), but the child grid (which has request.args, from the master record) doesn't because the search and clear but

[web2py] Grid sorting questions (referenced fields and case sensitive)

2019-03-28 Thread João Matos
Hello, I have these 2 tables opt and opt_cat, where opt depends on opt_cat for the category name and other settings. db.define_table('opt', Field('name', 'string', label=T('Name'), length=NAME_LEN, notnull=True, required=True, unique=True),

[web2py] Grid sorting bug when default orderby column type is date

2019-03-28 Thread João Matos
Hello, I have this action @auth.requires(auth.has_membership(CHECKER_ROLE) or auth.has_membership( SUPERVISOR_ROLE)) def list_tags_to_issue(): """List tags to issue. :return: Dict with grid. """ query = ((db.wo.is_active == True) & (db.wo.tags_issued == False)

[web2py] grid reloading the page and outdated flash msgs? (strange behavior...)

2018-12-27 Thread Vlad
Here is a test function in my controller: def test(): id = 0 try: id = request.args(0, cast=int) session.flash = "Here is the id: " + str(id) except: session.flash = "ID is not valid!" pass if id==0: redirect(URL('home')) query = db.test

[web2py] grid: top + button: how to adapt dynamically & translate the title 'add record to database' ?

2018-02-12 Thread Serge Bourgeois
Hello, The following codes changes dynamically the title of the button on the top left of the form in English. But when I switch to another language (exemple FR), I get the French translation of 'Add record to database', and not the translation of what I have placed in the title of this button.

[web2py] grid column names do not print nicely

2017-12-20 Thread icodk
When in grid or smartgrid trying to print the page with browser's own print function, columns name comes out as URLS of the page instead of the text of the name of the column name. Could be nice to be able to print with browser own print function. -- Resources: - http://web2py.com - http://web

[web2py] grid IS_IMAGE validator behavior

2017-12-06 Thread Carlos Cesar Caballero Díaz
Hi, I have being using web2py for some time, but I don't use files too often, now I am using the IS_IMAGE, but using the grid on edit it's throwing a validation error if the user don't set a new image. It's a bug or is the default behavior? -- Resources: - http://web2py.com - http://web2py.com

[web2py] Grid edit behavior when no changes are made

2017-08-02 Thread Seth J
Quick question, guys. I've noticed that when record is edited in a grid and no changes are made to it when hitting 'Submit' no entry is made into a corresponding archive table. However, fields "modified on" and "modified by" are adjusted according to a user who submitted a change. Is there wa

[web2py] grid show or hidden table coloumn

2017-08-01 Thread 黄祥
is it possible to show or hidden table coloumn in grid base on user choosen? thanks and 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) -

[web2py] grid for data entry

2017-07-22 Thread T.R.Rajkumar
I want data to be captured for tdr_bid_unrev_detls.rate. I have the query below. select d.jcod,d.qty,u.rate,u.amt from tdr_tender_master t join amc_master m on t.amc_id = m.id join amc_details d on m.id = d.amc_id left join tdr_bid_unrev_detls u on u.tdr_id = t.id and u.amc_id = m.id where m.

[web2py] Grid - limit searches to specified fields not whole tables

2017-07-07 Thread 'Matthew J Watts' via web2py-users
Hi all I’m having problems trying to tailor the grid to my needs I've set up a grid to query my db and it retrieves the data successfully, great! Example: def gridquery(): grid = SQLFORM.grid((db.MAIN.TaxonID == db.TAXON.TaxonID), field_id = db.MAIN.MainID, fields=[db.TAXON.Ta

[web2py] grid add/edit form label

2017-05-31 Thread T.R.Rajkumar
The grid object accepts headers but is only for the grid. Now how to set the labels of the fields in grid add/edit forms. Thanks in advance. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2

[web2py] grid edit

2017-05-23 Thread T.R.Rajkumar
I call this 127.0.0.1:8000/web_ocms/amc/newamcmaster/edit/amc_master/3 by clicking the edit button of the recor in the grid, and the edit form for the record is displayed. After editing when I submit error ticket is issued stating id column cannot be updated. Pl. help. Thanks for your time. The

[web2py] grid oncreate

2017-05-22 Thread T.R.Rajkumar
I have this in model. db.define_table('amc_master', Field('amcno', type='string',length=10,required='True',notnull='True',requires=IS_LENGTH(10)), Field('unitid',type='string',length=3,notnull='True'), Field('amcdesc', type='string',length=512,requi

[web2py] grid ondelete redirection

2017-03-18 Thread Andrea Fae'
Why the redirection is not working? def mostra_evento(): evento_id=request.args(0) query = (db.evento.id == evento_id) db.evento.inizio.writable=db.evento.fine.writable=db.evento.risorsa.writable=db.evento.docente.writable=db.evento.materia.writable=False db.evento.colore.readable

[web2py] grid export data with left join and groupby

2017-02-08 Thread 黄祥
hello, is it possible to have grid export data with left join and groupby output same like on the screen? e.g. def report_do(): table_header = db.do_header table_detail_0 = db.do_product_detail table_detail_1 = db.do_stock_detail groupby = table_detail_1.stock left = [table_detail_0.on(table_head

Re: [web2py] Grid

2017-01-24 Thread Javier Pepe
Hi You can use selectable metod to pass selected row to a function to update records. El sáb., 21 ene. 2017 a las 12:05, Bishal Saha () escribió: > Cant we use grid to update few rows ? > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/w

[web2py] Grid

2017-01-21 Thread Bishal Saha
Cant we use grid to update few rows ? -- 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 G

[web2py] Grid search disregards time zone

2017-01-12 Thread icodk
My server is in UTC, my client is in Europe (time zones) .When client searches on a date time field the datetime string is sent in local time. The grid is showing datetime in local time as it should,using the great timezone plugin (didn't work also before Breksit:-) -- Resources: - http://web2

[web2py] Grid export csv

2016-07-29 Thread Ryan Hood
How do you get the csv export to work in web2py grid? NOTE: Working with web2py version 2.14.6 and 2.14.5 Thank you, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] grid exportclasses not work in recent version

2016-06-16 Thread Anthony
Yes, an issue has already been filed. For now, you must use a dictionary with a key for each table. -- 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 r

[web2py] grid exportclasses not work in recent version

2016-06-16 Thread 黄祥
just want to report grid exportclasses is not work in recent version : e.g. def index(): table = db.test exportclasses = dict(csv_with_hidden_cols=False, xml=False, json=False, tsv_with_hidden_cols=False, tsv=False) grid = SQLFORM.smartgrid(table, exportclasses = exportclasses) return locals() no

[web2py] Grid remove class date/datetime

2016-05-12 Thread isi_jca
Hi!!! Is possible to remove class date/datetime from form Grid?. Thanks in advance -- 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 mes

[web2py] Grid custom DropBox

2016-02-20 Thread Charles tenorio
I have a SQLFORM.grid, where one of the columns and has a combo box, I created so lambda row: SELECT ('House', 'Off', 'Draw', name = 'spocoes'), I would like to know how to catch. the combo of value and move to args. thanks! -- Resources: - http://web2py.com - http://web2py.com/book (Documentati

[web2py] GRID export broken for CSV but not for JSON

2016-02-12 Thread olivier hubert
I implemented a clone of Notifier application from Massimo. If I try to export data from the grid via the grid bottom button I receive an error if I use export to CSV, HTML & TSV but not with JSON or XML. *default.py* @auth.requires_login() def tasks(): db.task.created_on.readable = True

[web2py] Grid without consulting database

2015-09-10 Thread Luis Valladares
Hello! I'm trying to use SQLFORM.grid (or something like this) to my website, but this page doesnt have a database because it consumes all the data form a service, so i ask the service for the list of records in a table and i recieve it in json format and transform to dictionary. What i want to

Re: [web2py] Grid query

2015-09-01 Thread Johann Spies
On 31 August 2015 at 15:17, Manuele Pesenti wrote: > Il 31/08/15 09:54, Manuele Pesenti ha scritto: > > to brutally by-pass the exception you can try something like... > > > > papers = db.wos_papers_by_dt.count.sum() > > setitem(papers, "tablename", "wos_papers_by_dt") > I apologize... I mean set

[web2py] Grid query

2015-08-27 Thread Johann Spies
In SQL I can do select doctype, sum(count) number from wos.za_publications where pubyear > 1979 group by doctype; In the web2py shell I can do: db.define_table('wos_papers_by_dt', Field('pubyear', 'integer'), Field('doctype'), Field('co

[web2py] grid: get rid of view buttons

2015-07-01 Thread jackson . read
I have a sqlform.grid, I would like to get rid of the view buttons at the end of each row. Unfortunately the grid has no attribute 'viewable' that you can set to False. Does anyone know how to do this?? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.c

[web2py] Re: web2py grid edit

2015-06-30 Thread Ben Lawrence
Also, if you look in your admin screen there are plug-ins available. One of them is plugin_SQLFORM_INLINE On Tuesday, June 30, 2015 at 10:29:40 AM UTC-7, Alessio Varalta wrote: > > Hi, i have a problem. I have a grid form but i want that the user can > modify the field without the section edit.

[web2py] Re: web2py grid edit

2015-06-30 Thread villas
Maybe Tim Richardson's ideas will help from web2pyslices ... http://www.web2pyslices.com/slice/show/1928/basic-inline-editing-in-sqlformgrid-no-plugin-no-javascript http://www.web2pyslices.com/slice/show/1714/jqgrid-viewing-and-updating-data -- Resources: - http://web2py.com - http://web2py.com/

[web2py] web2py grid edit

2015-06-30 Thread Alessio Varalta
Hi, i have a problem. I have a grid form but i want that the user can modify the field without the section edit..So i want load a grid where the user can modify the field and after click on a save button a save all parameters -- Resources: - http://web2py.com - http://web2py.com/book (Document

[web2py] grid

2015-06-16 Thread jackson . read
Is there anyway to make a SQLform.grid scroll instead of using page numbers. -- 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 bec

Re: [web2py] grid and field_id

2015-05-05 Thread Richard Vézina
It surely not going to be fix in 2.9.5... Do you check in new version of web2py if this issue is still relevant? If so consider open a ticket and maybe make a PR so others can review it. Richard On Tue, May 5, 2015 at 9:09 AM, Massimiliano wrote: > Hi, > > in web2py 2.9.5 and older I was using

[web2py] grid and field_id

2015-05-05 Thread Massimiliano
Hi, in web2py 2.9.5 and older I was using database views to simplify my work doing something like that: db.define_table('mytable',Field('myfield)) having a view on my db with all mytable fields plus some others. I define the view in web2py: db.define_table('myview',Field('myfield), Field(

[web2py] grid that only show search field

2015-03-13 Thread 黄祥
hi, is it possible to use grid that only show search field? the grid data table will show after user the search query is entered thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

Re: [web2py] .grid() my own search widget possible? How?

2015-03-06 Thread Richard Vézina
What you want I think is plain text search... There is a example using Whoosh, if you search the google group you should find Massimo email annoncing it... Good luck. Richard On Fri, Mar 6, 2015 at 10:44 AM, Ron Chatterjee wrote: > Basically, quick and dirty way to display the search bar on th

Re: [web2py] .grid() my own search widget possible? How?

2015-03-06 Thread Ron Chatterjee
Basically, quick and dirty way to display the search bar on the top of the site using smartgrid without showing the table. Then when someone put a query and hit, "search", be able to redirect to another page. That way, the prototype will be complete without writing a customized search routine.

Re: [web2py] .grid() my own search widget possible? How?

2015-03-06 Thread Richard Vézina
You want the table to pop when there will be results selected? If so, I guess you will need some JS. You will need to init the table with a query that prevent any result to be selected (this query will require to be hiden somehow JS this is the tricky part, you will need to clear behind the scene

Re: [web2py] .grid() my own search widget possible? How?

2015-03-05 Thread Ron Chatterjee
I just posted a question in the web2py group. Searching I came to this post. Since you guys worked on this. What if I do like the default search and want to stick with it and display the search box that comes out of SQLFORM.grid or smartgrid but I don't want to display the table underneath. Do

[web2py] Grid order for reference fields

2015-01-21 Thread Gael Princivalle
Hello all. In my grid if the user click on head columns for reference fields the order is made by row id and not by the row format. My db: db.define_table('l1_categories', Field('name'), format = '%(name)s') db.define_table('l2_categories', Field('l1_category', 'reference l1_categor

[web2py] grid and expressions

2014-12-20 Thread Manuele Pesenti
Hi *, why expressions are not accepted by grid while I can use parameter groupby? I think they could be treated as virtual fields... right? Thanks Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://cod

[web2py] grid selectable only select 1 row

2014-11-29 Thread 黄祥
hi, is it possible grid selectable only select 1 row? i've tested it but with no luck, e.g. *controllers/order.py* def sale_order_detail(): selectable = lambda ids : redirect(URL('sale_order_detail_checkout', vars = dict(ids = ids) ) ) #selectable = lambda ids: sale_order_detail_checkout(ids) gri

[web2py] grid modes

2014-11-20 Thread Alex Glaros
am seeking to display a button in view only if grid is in "view" mode. otherwise, button inappropriately pops up in edit mode. anyone see anything wrong with this code in the view? {{if request(0) == 'view':}}Post a brand new suggestion}}{{pass} error is: Request' object is not callable tha

[web2py] grid column order

2014-11-17 Thread Alex Glaros
I want the first column in grid to be a link. It's an already-existing field in a table and displays in the correct order when not linkable. Is using "represent" the only way to make this column in this first-position a link? If I use the links= statement, the column is displayed to the right,

[web2py] grid search on field "list:string"

2014-10-25 Thread Alen Cerovic
Grid search widget does not show fields with datatype "list:". How to "enable" searching on these fields in grid search? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Repor

[web2py] GRID selectable inside component

2014-10-15 Thread LaDarrius Stewart
I have a grid inside a component inside a component which has selectable set to run a function that assigns the ids to a session variable. When inside the component it does not work when i click submit I can tell that the page is being reloaded but the callback does not run. I know that the cod

[web2py] Re: web2py grid auto page

2014-09-22 Thread Dave S
On Saturday, September 20, 2014 9:43:34 PM UTC-7, T.R.Rajkumar wrote: > > I have a SQLFORM.grid. It paginates the returned rows. Now I want to move > through all the pages on a set timer interval without clicking the page > numbers, i.e I want to auto page like an album without post back using

[web2py] web2py grid auto page

2014-09-21 Thread T.R.Rajkumar
I have a SQLFORM.grid. It paginates the returned rows. Now I want to move through all the pages on a set timer interval without clicking the page numbers, i.e I want to auto page like an album without post back using jQuery. How to achieve that. Thank you. -- Resources: - http://web2py.com - h

Re: [web2py] web2py grid select all filtred rows

2014-08-14 Thread Manuele Pesenti
Il 13/08/14 21:29, keiser1080 ha scritto: > so on the controler i can get the rows by doing grid.rows? yes > The query is also stored on an accessible grid proprety ? I don't know. The code of the function that defines the grid is not so easy to read but you can try to look into it: https://github.

Re: [web2py] web2py grid select all filtred rows

2014-08-13 Thread keiser1080
thanks for you reply. I will check tomorro at work. so on the controler i can get the rows by doing grid.rows? The query is also stored on an accessible grid proprety ? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

Re: [web2py] web2py grid select all filtred rows

2014-08-12 Thread Manuele Pesenti
Il 12/08/14 19:42, keiser1080 ha scritto: > Hi, > > is there a way to get the query or the list of id from a filtred grid? > > for example a grid listing all students with pagination => filter data > using the search widget of the grid student.age > 20 > => 2000 rows (multiple pages) => send d

[web2py] web2py grid select all filtred rows

2014-08-12 Thread keiser1080
Hi, is there a way to get the query or the list of id from a filtred grid? for example a grid listing all students with pagination => filter data using the search widget of the grid student.age > 20 => 2000 rows (multiple pages) => send data to another page or fonction ? -- Resources: - h

Re: [web2py] grid problem

2014-07-30 Thread Anthony
On Wednesday, July 30, 2014 4:59:41 AM UTC-4, Manuele wrote: > > Il 30/07/14 09:30, ceriox ha scritto: > > thanks Javier! > > but can you explain "must be a function"? > > i use this code in other functions (for other tables) and it work fine! > > how i need to change it? > Dear ceriox, > I t

Re: [web2py] grid problem

2014-07-30 Thread Manuele Pesenti
Il 30/07/14 09:30, ceriox ha scritto: > thanks Javier! > but can you explain "must be a function"? > i use this code in other functions (for other tables) and it work fine! > how i need to change it? Dear ceriox, I think here lie the problem: https://github.com/web2py/web2py/blob/master/gluon/sqlht

Re: [web2py] grid problem

2014-07-30 Thread ceriox
thanks Javier! but can you explain "must be a function"? i use this code in other functions (for other tables) and it work fine! how i need to change it? Il giorno martedì 29 luglio 2014 17:51:47 UTC+2, Massimo Di Pierro ha scritto: > > good catch! > > On Tuesday, 29 July 2014 10:39:15 UTC-5, J

Re: [web2py] grid problem

2014-07-29 Thread Massimo Di Pierro
good catch! On Tuesday, 29 July 2014 10:39:15 UTC-5, Javier Pepe wrote: > > form = SQLFORM.grid(db.t_proposte, >searchable=True, > deletable=True, >details=False, > * selectable**=True,** <- must be a funct

Re: [web2py] grid problem

2014-07-29 Thread Javier Pepe
form = SQLFORM.grid(db.t_proposte, searchable=True, deletable=True, details=False, * selectable**=True,** <- must be a function* csv=True, user_signature=False) #

[web2py] grid problem

2014-07-29 Thread ceriox
hi all, i have a table with some fields (two of the type boolean) if i use form = SQLFORM.smartgrid(db.t_proposte,onupdate=auth.archive) all work fine! but if i use: form = SQLFORM.grid(db.t_proposte, searchable=True, deletable=True,

[web2py] web2py grid Serch and query

2014-07-20 Thread Rohit Raj Sharma
how to limit the list which come by clicking on the sqlgrid default search. I have 10 fields in table. i do not want to show all the fields on list of default search. Can it possible to customize the list of default search widget. this i can in html drop down, but that is very complex and incre

[web2py] grid: deletion row callback

2014-07-07 Thread Manuele Pesenti
Hi! is it possible to setup a _javascript_ trigger on grid row deletion event? Possibly capturing the data of the row that will be deleted? thank you in advance. Cheers Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sour

[web2py] grid orderby parameter not quite useful for a foreign key column

2014-07-05 Thread 98ujko9
The grid below orders the rows by part_description column only the first time the action is called. After that if you click on the header link it orders by pp_part_id foreign key which is not as useful as it could be by part_description. Why the link in the header for that column does not receiv

[web2py] Re: Web2py grid shows key from IS_IN_SET({key: value}) model

2014-06-12 Thread 黄祥
it works, thank you so much, anthony e.g. product_status = {'On Sale': T('On Sale'), 'Hold': T('Hold'), 'Sold': T('Sold')} table.status.represent = lambda status, field: SPAN(product_status[status], _class = 'text-success' if status == 'Sold' else 'text-warning' if status == 'Hold' else 'text-e

[web2py] Re: Web2py grid shows key from IS_IN_SET({key: value}) model

2014-06-12 Thread Anthony
On Wednesday, June 11, 2014 3:48:15 PM UTC-4, 黄祥 wrote: > > Hi, Anthony, is it possible to combine the represent for change the color > depend on the value with the represent for is_in_set translate above? > e.g. > Sure, instead of SPAN(status, ...) do SPAN(mydict[status], ...). Anthony -- Res

[web2py] Re: Web2py grid shows key from IS_IN_SET({key: value}) model

2014-06-11 Thread 黄祥
Hi, Anthony, is it possible to combine the represent for change the color depend on the value with the represent for is_in_set translate above? e.g. table.status.represent = lambda status, field: SPAN(status, _class = 'text-success' if status == 'Sold' else 'text-warning' if status == 'Hold' els

[web2py] Re: Web2py grid shows key from IS_IN_SET({key: value}) model

2014-06-11 Thread Anthony
Sorry, do it this way: mydict = {1: T(''), 2: T('')} Anthony On Wednesday, June 11, 2014 11:24:34 AM UTC-4, Stefan van den Eertwegh wrote: > > Hi Anthony, > > I am sorry but it doesnt work. > Also gives pycharm an error at the rule mydict = dict > > Stefan > > Op woensdag 11 juni 2014 17:06

[web2py] Re: Web2py grid shows key from IS_IN_SET({key: value}) model

2014-06-11 Thread Stefan van den Eertwegh
Hi Anthony, I am sorry but it doesnt work. Also gives pycharm an error at the rule mydict = dict Stefan Op woensdag 11 juni 2014 17:06:06 UTC+2 schreef Anthony: > > mydict = dict(1=T(''), 2=T('')) > > db.define_table('mytable', > Field('myfield', represent=lambda v, r: mydict

[web2py] Re: Web2py grid shows key from IS_IN_SET({key: value}) model

2014-06-11 Thread Anthony
mydict = dict(1=T(''), 2=T('')) db.define_table('mytable', Field('myfield', represent=lambda v, r: mydict[v])) Anthony On Wednesday, June 11, 2014 10:50:06 AM UTC-4, Stefan van den Eertwegh wrote: > > Hi Anthony, > > Me and my colleges tried it with represent but we cant figure

[web2py] Re: Web2py grid shows key from IS_IN_SET({key: value}) model

2014-06-11 Thread Stefan van den Eertwegh
Hi Anthony, Me and my colleges tried it with represent but we cant figure it out. Can you give an example how this should work? The table and column is templates.type (key: value) Regards, Stefan van den Eertwegh Op woensdag 11 juni 2014 16:37:13 UTC+2 schreef Anthony: > > The IS_IN_SET validato

[web2py] Re: Web2py grid shows key from IS_IN_SET({key: value}) model

2014-06-11 Thread Anthony
The IS_IN_SET validator affects form widgets but not other displays of the values in the field. If you want to change the way a value is displayed in a grid (or SQLTABLE), you must use the "represent" attribute of the field. Anthony On Wednesday, June 11, 2014 8:58:54 AM UTC-4, Stefan van den E

[web2py] Web2py grid shows key from IS_IN_SET({key: value}) model

2014-06-11 Thread Stefan van den Eertwegh
Hi all, I have a model where a Field has IS_IN_SET({'1':T(''),2:T('')}). When you have a grid in web2py; When you edit the record you see the value (the translatable string). But when you view the record you see the key of the IS_IN_SET. IS is possible to have the grid showing the value from th

[web2py] Grid data is not displayed on using Edit/View in case there are two grids in one view

2014-06-09 Thread Sarbjit
I am using two grids in my application but I have observed that when I use Edit/View button for GRID1, then the layout of the grid is not proper (Data from Grid1 is not seen) and default layout doesn't seems to be loaded. NOTE :- Since web2py doesn't supports two grids in one view, I am using L

Re: [web2py] .grid() my own search widget possible? How?

2014-06-04 Thread JoeCodeswell
Dear Richard, Would you (and Jim) please post your sample code? Thanks in advance. Love and peace, Joe On Thursday, April 24, 2014 8:10:01 AM UTC-7, Richard wrote: > > I am reading the sqlhtml.py search_widget... > > So I would just pass my function (search widget) like that : > > SQLFORM.grid

[web2py] Web2py grid pagination class set

2014-05-19 Thread Stefan van den Eertwegh
Hi al, I have a grid in web2py and want a pagination class define to use the bootstrap pagination styling. The parameters pagination_class and paginator_class doesnt work. Does anyone know how this works? Thank you! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] grid issues

2014-05-01 Thread LaDarrius Stewart
def qadata(): form2=FORM(LABEL("",INPUT(_type="text",_name="lastname",requires=IS_LENGTH(minsize=3), _placeholder="Company Name", _size="35", _style="font-size:15px")), BUTTON("Submit", _type="submit",_value="Submit", _data={'loading-text':'loading'})) grid=None

Re: [web2py] .grid() my own search widget possible? How?

2014-04-24 Thread Richard Vézina
I am reading the sqlhtml.py search_widget... So I would just pass my function (search widget) like that : SQLFORM.grid(..., search_widget=my_search_widget_function) ? Thanks Richard On Thu, Apr 24, 2014 at 10:38 AM, Jim S wrote: > Yes, you definitely can. > > I don't

Re: [web2py] .grid() my own search widget possible? How?

2014-04-24 Thread Jim S
Yes, you definitely can. I don't ever use the default search. In a nutshell, you have to create your own search form and then apply the results of that form to the query passed to the grid. Let me know if you need an example and I'll see if I can put a quick one together for you today. -Ji

[web2py] .grid() my own search widget possible? How?

2014-04-24 Thread Richard
Hello, Is it possible to create my own search widget? How does I get the grid to use it? Thanks Richard -- 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) ---

[web2py] Grid 2 list boxes first list box to restrict values in second

2014-03-20 Thread Dan Kozlowski
Is there any way within a grid with 2 list boxes that the selected value in the first list box can sub select the the second the values in the listbox ? A example would be selecting a state and only selecting cities in that state. Example : State : IL Cites : Chicago Calumet City

[web2py] grid coloum width

2014-03-10 Thread 黄祥
hi, i have the table field data that using represent on it but the coloumn width it's seems affected by the table field header. e.g. db.define_table('supplier', Field('name'), Field('address', 'text'), Field('phone', 'list:string'), Field('email', 'list:string'), Field('ym', 'list:string'),

[web2py] Grid in component edit twice issue

2014-01-15 Thread Jim Karsten
I have a grid inside a component. When I click the 'Edit' button on a row, submit the Edit form, then click the 'Edit' button a second time, the page reloads with only the component. Controllers: def index(): """Container controller.""" return dict() def people(): """Grid con

[web2py] Grid back button for custom single view

2013-12-29 Thread Gael Princivalle
Hi all. I've made a custom grid single view, that is in the same html page where I call the complete grid. When I call for request.env.http_referer for going back to the previous page I have inside the current page, not the previous one, the same html page but with the grid. For example I make

[web2py] grid with dictionary

2013-12-06 Thread Diego Tostes
Hi, Is it possible create a grid like SQLform.grid using a dictionay instead of a query result? Rgds, Diego -- 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)

[web2py] grid links appearing in details

2013-11-15 Thread Mirko
Hi all, I have grid "links" appearing in details, on the same row than the 'back' and 'edit' buttons. How can I make them not display ? Thanks ! Mirko -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.

[web2py] grid exception, what is wrong?

2013-10-29 Thread Marin Pranjić
This is the code: query=db.customer_code codes=SQLFORM.grid(query, left=db.file_queue.on(db.file_queue.code_id== db.customer_code.id)) On 2.7.1 it prints exception in grid (html). On 2.7.4 and trunk it raises a ticket. Is this change intentional? And why is this not working? Exception

[web2py] grid in component only works in Firefox

2013-10-21 Thread Jim S
I have the following in my component controller: form = SQLFORM.factory(Field('productSiteId', db.productSite, label='Add-on', required=True, requires=requires), Field('quantity', 'decimal(9,4)', label='at'),

[web2py] grid: readable for columns and backgroundcolors for rows

2013-10-20 Thread Martin Weissenboeck
Hi, I have a SQLFORM.grid with details=True. A click on the "details"-ikon (the magnifier) shows another TABLE or SQLFORM. Two problems: (1) I have one column with a lot details, which should not be visible in the grid, but should be visible in the second table/sqlform. (2) I want to have even/

[web2py] grid layout problem

2013-10-08 Thread stefaan
Hello all, I noticed the following when using a grid with some "links" (custom buttons) put at the left, using the default layout (and using ui-style "web2py"): - when the grid is on a large screen, the custom button column takes too much space - on a small screen, the custom buttons overlap wi

[web2py] Grid console with rows per page selector

2013-10-01 Thread Cliff Kachinske
I'm modifying the SQLFORM.grid console to include a rows per page selector. It seems like a natural thing to have there. I have some questions about the code that builds the search widget. Near line 2153 I find this: search_widget = lambda sfield, url: *CAT(*FORM(

[web2py] grid, smartgrid and ignore_default_filters

2013-09-27 Thread Martin Weissenboeck
Hi, I am using default filters at many places. Now I want to bulid a grid or a smartgrid, but I have to set "ignore_default_filters=True". How can it be done? The parameter"query" seems not be the right way. Regards, Martin -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

[web2py] Grid and mouseover/tooltips

2013-09-24 Thread Warren Block
With some fields truncated in a grid, it would be nice to show the full value in a tooltip when the mouse is over it. Offhand, I think that will take a calculated field. Is there an example anywhere? For that matter, examples of general examples of grid use would be really nice. Thanks! --

  1   2   3   >