Any Ideas what is happening? On Jun 29, 2:00 pm, "[email protected]" <[email protected]> wrote: > I am still not having any luck with sorting my DataGrid Columns, I > have had a hard look at pagedemo2 and stil my data will not sort. > > Below is code snippets: > > Query statment: > > Phytochemicals_Object_list = > session.query(Phytochemical).filter(Phytochemical.id.in_(phytochemical_id_l > ist)) > > which produces : > > SELECT phytochemical.id AS phytochemical_id, phytochemical.name AS > phytochemical_name, phytochemical.source AS phytochemical_source, > phytochemical.bddb_id AS phytochemical_bddb_id, phytochemical.star AS > phytochemical_star > FROM phytochemical > WHERE phytochemical.id IN (%s, %s, %s, %s, %s, %s, %s, %s, %s) > > DataGrid: > > sortable = dict(sortable=True) > phyto_grid_test01 = PaginateDataGrid(name='Phyto', > fields=[ > ('Name','name',sortable) > ]) > > Template: > > <table> > <tr> > <td style="width:900px;" > > <div class="xscroll"><span>$ > {phyto_grid.display(phyto_records)}</span></div> > </td> > > </tr> > </table> > > Controller: > > @expose(template = "bddb.templates.grid") > @paginate("phyto_records",default_order='name') > def AgentProcess(self, **kwargs): > > data = > session.query(Phytochemical).filter(Phytochemical.id.in_(phytochemical_id_l > ist)) > > return dict(header = "Agent Tool Results", > pagetitle = "Agent Results", > description = "", > phyto_records = data > phyto_grid = phyto_grid_test01 > ) > > Please what am I doing wrong? > > Regards > > On Jun 28, 6:21 pm, "[email protected]" <[email protected]> wrote: > > > > > > > > > Will get pagedemo2 running.... > > > On Jun 28, 5:09 pm, Christoph Zwerschke <[email protected]> wrote: > > > > Am 28.06.2011 15:41, schrieb [email protected]: > > > > > Let me ask this, if I have a column of names and I click the heading > > > > once it should sort A-Z and when I click it again it will sort Z-A. > > > > Just to check what I am try to should work or is this not the purpose > > > > of this type of sort. > > > > Can you run pagedemo2? It should work exactly like that. > > > > -- Christoph
-- 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.

