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 LOAD for 
one gird and second grid is loaded directly. 

Reason, I want to display second grid directly is that I want to customize 
the edit function for the grid.

Below is the sample Code 

*Views :*

{{extend 'layout.html'}}
{{if grid.view_form:}}
{{=grid}}
{{elif grid.update_form:}}
{{=grid}}
{{else:}}
{{=grid}}
{{=LOAD('default','loadGrid1',ajax=True)}}
{{pass}}

*Controller :*

@auth.requires_login()  
def index():
    grid = 
SQLFORM.grid(query=db.person,csv=False,create=False,deletable=False,paginate=20,sortable=True)
    return dict(grid=grid)    

def loadGrid1():
    grid1 = 
SQLFORM.grid(query=db.dog,csv=False,create=False,deletable=False,paginate=20,sortable=True)
    

    return grid1    

*Model :*

db.define_table('person', 
    Field('name'), 
    Field('countyry'))

db.define_table('dog',
    Field('name'),
    Field('ownername'))Models :

Can someone please help me to resolve this issue.

Thanks
Sarbjit


-- 
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