When you submit a form in an Ajax component, only the component will refresh -- so if you make a filter form contained in the component with the grid, when the form is submitted, it will reload the whole component. You can also customize the grid search widget to do whatever you want -- both "searchable" and "search_widget" take callables, so you can customize the search behavior. Finally, even if your filter form/widget is outside the grid component, you can use JS to trigger a reload of the component by calling the web2py_component() JS function directly.
Anthony On Sunday, July 22, 2012 11:47:13 PM UTC-4, dave wrote: > > Wow, that was fast, first time asker here, > I have an SQLFORM.grid in a view, when I click the pagination links at the > bottom of the page 1, 2, 3 etc, the whole page refreshes. To avoid this > problem, I created a component and put it in a view > <div id="grid"> > {{=LOAD('default','ajaxTable2.load',ajax=True, target='grid', > content='loading...')}} > </div> > > > <https://lh5.googleusercontent.com/-IuP9zYl2i3E/UAzI4jmSzaI/AAAAAAAACrA/tjLj4mSDifA/s1600/pagination+without+refresh.png> > this will solve the whole page refresh problem, but now I want to filter > the table from an input box for example if I have 100 records, when I type > in 50 in the input box, the grid will return the first 50 records only, how > would I go about solving this problem that avoids the page refresh problem? > --