On Thu, Feb 24, 2011 at 9:56 AM, raulna <[email protected]> wrote: > Hi, i'm trying to pass a parameter to filter the data on the grid > like : > > @expose('json') > def fetch(self, page=1, rp=25, sortname='title', sortorder='asc', > qtype=None, query=None): > ... > movies = DBSession.query(Movie).filter_by( ... "PARAMETER" ...) > .... > > Then, i don't know how to pass this parameter to the controller from > the template: > > ${tmpl_context.grid( ¿¿PARAMETER???? )} >
You should add to the Grid declaration a searchitem (searchitems parameter on grid construction). Then it will be passed to your fetch call as the qtype argument with its content inside the query argument. Take a look at http://turbogears.org/2.0/docs/main/ToscaWidgets/Cookbook/FlexiGrid.html#optional-parameters -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

