Datagrid custom sorting for a column

Andre.Bisseret Andre.Bisseret at inria.fr
Sun Jul 25 02:59:03 EDT 2010


Bonjour Malte,

No sure there is a way to do that with a command from data grid  
(others might tell us ;-))

In such a case I return to general rev scripting.

Try this:

    local tTheData,
    --------
    set the dgProp["sort by column"] of grp "datagrid" to empty --  
remove any column sorting that might be active
    put the dgText of grp "datagrid" into tTheData
    set the itemDel to tab
    sort lines of tTheData ascending numeric by word 2 of item 2 of each
    set the dgText of grp "datagrid" to tTheData
end mouseUp

Hope this help

Best regards from Grenoble

André

Le 25 juil. 10 à 02:35, Malte Pfaff-Brill a écrit :

> Seems I am a bit too dumb for this...
>
> If I wanted to sort the data for a datagrid ascending numeric by  
> word 2 of each line of column 2, how would I do this?
>
> I *think* I need the SortDataGridColum message, but what would I  
> need to do with it?
>
> All help greatly appreciated.
>
> All the best,
>
> Malte
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution






More information about the use-livecode mailing list