Am 14.04.2010 13:25 schrieb jose soares:
gridFields=[ #campi della grid
NewSelectablePagDataGrid.Column(name='specie_codice', title='codice',
> ...
]

class Controller(object):
@tg.expose(template="kid:sicer.BASE.view.templates.edit")
@tg.paginate(var_name='grid_params', max_limit=None, dynamic_limit='limit')
def index(self):
...
)

I just tried your controller and grid with TG 1.1.1 and it is working fine for me with the standard PaginateDataGrid widget, I can sort and paginate, the sorting takes place in the database and there are no errors if there are null columns for the dates.

-- Christoph

(This is what I used as model file:)

specie_table = Table('specie', metadata,
    Column('codice', String(8), primary_key=True),
    Column('descrizione', String(32)),
    Column('data_fine', DateTime, default=datetime.now),
Column('cod_gruppo_specie', Integer, ForeignKey('gruppo_specie.codice')))

gruppo_specie_table = Table('gruppo_specie', metadata,
    Column('codice', String(8), primary_key=True),
    Column('descrizione', String(32)))

class Specie(object):
    pass

class GruppoSpecie(object):
    pass

mapper(Specie, specie_table)

mapper(GruppoSpecie, gruppo_specie_table,
    properties=dict(
        species=relation(Specie, backref='gruppo_specie')))

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

Reply via email to