Datagrid form - sorting?

John Burtt jburtt at earthlink.net
Mon Jan 18 03:56:10 EST 2010


Malte,

try this:

##  if the timeStamp is a number
put "numeric" into theSort

or,

##  if the timeStamp is a date and time
put "date and time" into theSort

dispatch "sortDataByKey" to group "dataGrid" with  
"timeStamp","theSort","descending","false"

"timeStamp" = the key to sort by
"theSort" = the sort type
"descending" = the direction
"false" = whether or not the sort is case-sensitive

Cheers, John


> I have a datagrid form that has a timestamp in its dataArray. I  
> would like to sort the data in the datagrid using that timestamp.
> For lists this is easy, but is it also possible for forms?
>
> the data might look like this
>
> tData[1]["timestamp"]
> tData[1]["otherData"]
> tData[2]["timestamp"]
> tData[2]["otherData"]
>
> Thanks in advance,
>
> Malte





More information about the use-livecode mailing list