let's go with the uber-difficult setup (assuming that you meant "grid with 
checkboxes" and the "submit button" is the one that shows up when you pass 
a lambda to selectable)


def grid1():
    a = 'grid1 %s' % request.now
    grid = SQLFORM.grid(db.auth_user, formname='grid1', user_signature=False
, selectable=lambda ids: redirect(URL(vars=dict(check=ids))))
    #something was checked, on reload trigger a component refresh on 
grid2_div
    if request.vars.check:
        response.js = """$.web2py.component('%s', 'grid2_div')""" % URL(
'grid2.load')
    return locals()

def grid2():
    a = 'grid2 %s' % request.now
    grid = SQLFORM.grid(db.auth_user, formname='grid2', user_signature=False
)
    return locals()

def grid_all():
    a = LOAD('default', 'grid1.load', ajax=True, target='grid1_div')
    b = LOAD('default', 'grid2.load', ajax=True, target='grid2_div')
    return locals()



or, you leave out the response.js part and include in grid1.html the 
following js snippet

$('#grid1_div .web2py_grid .web2py_table form').submit(
     function() {
         var action = $('#grid2_div').data('w2p_remote');
         $.web2py.component(action, 'grid2_div')
     }
)

voilĂ : good to go.

On Tuesday, October 8, 2013 11:05:26 PM UTC+2, Niphlod wrote:
>
> let's see...what is a grid "with select boxes" ? you mean "checkboxes" ? 
> how is it configured the first grid to "be refreshed" ?
>
> On Tuesday, October 8, 2013 10:53:56 PM UTC+2, Jim S wrote:
>>
>> I have a SQLFORM.grid in a loaded component on my page with select boxes. 
>>  When I click on the submit button I want to refresh the grid, but when 
>> that is done I also want to refresh the grid in the other loaded component 
>> that is on the page.
>>
>> Is this making sense?  
>>
>> Anyone know how I can do that?
>>
>> -Jim
>>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to