Hi Andre,

thank you very much for your answer. I tried your code but it doesn't do the 
job. It is like pushing the column header of the datagrid two times (first the 
number one and the the date one).

My data come from a sql base so I can (as Steven said) make the query do the 
work of the multiple sorting before loading into the datagrid but I'm scared 
about performances when it comes to manage hundreds of thousands of data. In 
this scenario I need to retrieve data from the sql base and then populate the 
datagrid every time I need to sort the rows without the data I already have in 
the datagrid. This means more traffic over the network and multiple populations 
of the datagrid...

Best regards
Marcello



On 21/apr/2010, at 19.33, Andre.Bisseret wrote:

> I think yes! Assuming for instance you want the dates sorted from the oldest 
> down to the more recent
> and then, for each date, the numbers should be sorted from the smaller down 
> to the greater
> you should sort the numbers column first then the dates' column.
> Something like that:
> 
> on mouseUp
> ##setting the sort type value for each column
>   set the dgColumnSortType["date"] of grp "datagrid 1" to "system dateTime"
>   set the dgColumnSortType["number"] of grp "datagrid 1" to "numeric"
>   set the dgColumnSortType["title"] of grp "datagrid 1" to text
> ## making sure the two columns will have the same sortDirection if necessary
>   set the dgColumnSortDirection["date"] of grp "datagrid 1" to "ascending"
>   set the dgColumnSortDirection["number"] of grp "datagrid 1" to "ascending"
> ## sort "number" first then "date"
>   dispatch "sortByColumn" to grp "datagrid 1" with "number"
>   dispatch "sortByColumn" to grp "datagrid 1" with "date"
> end mouseUp
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to