You say it works with a SQLFORM but not a grid -- what happens when you try 
with a grid?

On Monday, January 15, 2018 at 10:16:38 AM UTC-5, Tu Duong wrote:
>
> Hi,
>
> I want to display the table's content when user clicks the button, here is 
> my code and it does not work. I can display the SQLFORM, but for some 
> reason, it does not work with SQLFORM.grid
>
> --*default.py*
> def index():
>     return dict( list_program       = SQLFORM.grid(db.Program) )
>
>
>
>
> --*index.html*
> <script>
> jQuery(document).ready(function(){
>    jQuery('#btn_list_program').click(function(){   jQuery('#selected_form'
> ).html( '{{=list_program}}' ) });
> </script>
>
>
> <div class="container-fluid">
>     <div class="row">
>         <div class="col col-sm-2">
>               <div class="btn-group-vertical" role="group" style="width:
> 100%">
>                     <button id="btn_list_program"   type="button" class="btn 
> btn-outline-primary">ListProgram</button>
>               </div>
>         </div>
>         <div class="col offset-sm-1" id="form_wrapper">
>             <div id="selected_form"></div>
>         </div>
>    </div>
> </div>
>
>

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