Odd sort of numbers after text import in DataGrid

Pete pete at mollysrevenge.com
Tue May 10 19:35:10 EDT 2011


There's a property of a datagrid column in the columns inspector that lets
you specify what type of sort to perform - text, numeric, etc.

In scripts you can do the same thing by setting the
dgcolumnsorttype[<yourcolumnname>] to "numeric".  Probably want to do that
in a SortDatagridColumn message handler in the datagrid's group script to
set that and other sort properties any time the user clicks on a column
header  to sort it.  Full details in the Datagrid Reference manual.

Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Tue, May 10, 2011 at 4:07 PM, tbodine <lvhdgc7 at gmail.com> wrote:

> Hi,
> Having a bit of trouble sorting score numbers after importing a
> tab-delimited text file. Using dgText for import into a table, sorting the
> score column shows:
> 0
> 9
> 10
> 100
> 11
>
> Is there a way to change certain columns to be sorted as number data
> instead
> of text?
>
> Thx,
> Tom Bodine
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Odd-sort-of-numbers-after-text-import-in-DataGrid-tp3513277p3513277.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



More information about the use-livecode mailing list