Discussion:
[Erp5-dev] Sorting listboxes' columns using 'integer' sort
Mikolaj Antoszkiewicz
2007-04-11 16:31:08 UTC
Permalink
I know it is possible to make portal_catalog sort the data it retrieves by the
integer field, by forcing 'int' conversion of the sorted field.

Is it possible to make listbox do the same, i.e. sort by numerical ID in '1 2
3 4 10' fashion rather than '1 10 2 3 30' ? And how that can be achieved?
Is it something to do with Default Sort property?

Mikolaj

P.S. The List Method is a custom script not a portal_catalog/searchFolder...
Jérôme Perrin
2007-04-11 17:42:21 UTC
Permalink
Post by Mikolaj Antoszkiewicz
I know it is possible to make portal_catalog sort the data it retrieves by
the integer field, by forcing 'int' conversion of the sorted field.
Is it possible to make listbox do the same, i.e. sort by numerical ID in '1
2 3 4 10' fashion rather than '1 10 2 3 30' ? And how that can be achieved?
Is it something to do with Default Sort property?
Mikolaj
P.S. The List Method is a custom script not a portal_catalog/searchFolder.
Custom scripts have to understand sort_on parameter and sort accordingly. If
you don't use catalog, you have to sort in python.

J?rome
Jean-Paul Smets
2007-04-12 08:26:36 UTC
Permalink
Post by Mikolaj Antoszkiewicz
I know it is possible to make portal_catalog sort the data it retrieves
by the integer field, by forcing 'int' conversion of the sorted field.
Is it possible to make listbox do the same, i.e. sort by numerical ID in
'1 2 3 4 10' fashion rather than '1 10 2 3 30' ? And how that can be
achieved? Is it something to do with Default Sort property?
There should be both a sort button to configure this and a default sort
option in the listbox.

JPS.
Post by Mikolaj Antoszkiewicz
Mikolaj
P.S. The List Method is a custom script not a
portal_catalog/searchFolder...
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://erp5.org/mailman/listinfo/erp5-dev
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
Loading...