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
    db.JRREG00.id.readable=False
    if form2.process(session=None, formname='form2').accepted:
        lastnamesch = form2.vars.lastname.strip(' \t\n\r')
        rows = ((db.JRREG00.Company_Name.like(str(lastnamesch) + '%')))
        links = [lambda row: A(BUTTON('Details!'), 
_href=URL('default','qacompanypage',args=row.id))]
        grid=SQLFORM.grid(rows, buttons_placement = 'left', links_placement 
= 'left', links=links, deletable=False, paginate=6,
                          
create=False,editable=False,details=False,searchable=False,csv=False, 
maxtextlength=35, user_signature=True)
    return locals()

Currently im displaying a grid from a query thats created after a form is 
filled. But with this approach im not able to go to next page or paginate 
or use links like details etc. I know I have them disabled but the issue 
still stands because its the same issue causing the pagination not to work. 
If you click on another page of the grid it brings back the original page 
with no grid information. I'm sure someone is going to ask why I didnt use 
the search that comes with the grid two reasons.
1) I dont want the auto execute of grids that bring back records before a 
search is executed.
2) I dont want users to have ability to search by different columns.

If I didn't explain that well let me know ill show an example.


-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to