sorting a column in a dataGrid by dateTime

André Bisseret andre.bisseret at wanadoo.fr
Wed Dec 11 03:21:44 EST 2013


Bonjour Curt,

If you would like to sort by script, here are some lines that could help :

set the dgColumnSortType["Date"] of grp "dataGrid" to "dateTime" (or "system dateTime")

set the dgColumnSortDirection["Date"] of grp "dataGrid" to "ascending" (or descending)

dispatch "sortByColumn" to grp "dataGrid" with "Date"
also:
set the dgProp["sort by column"] of grp "dataGrid" to "Date"

Best regards from Grenoble

André

Le 10 déc. 2013 à 22:58, FORD JR., CURT a écrit :

> [palm smacks forehead]
> 
> Again, so much simpler than I'd realized. Thanks Pete!
> 
> 
> Hi Curt,
> I don't think you need any code to do the sort in a datagrid.  In the
> Inspector for the datagrid, go to the columns tab, select the column that
> needs to be sorted by date, then down at the bottom select "datetime" from
> the "Type" menu.  When the user clicks on the date column, it should sort
> correctly.
> 
> Pete
> lcSQL Software <http://www.lcsql.com<http://www.lcsql.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