DataGrid Sorting

Trevor DeVore lists at mangomultimedia.com
Mon Nov 23 18:37:31 EST 2009


On Nov 22, 2009, at 10:24 AM, RevList wrote:

> In my datagrid, I load in a column from a SQLite database that is the
> number of seconds that a person has been logged in to a particular  
> server.
> I have a function that converts the data into days, hrs, mins, seconds
> and populates another column in the datagrid at fill time.  This works
> perfectly.
>
> I have have hidden the original column in the datagrid and have  
> modified
> the SortDataGridColumn so that when one clicks on the modified  
> column it
> either sorts or reverse sorts the datagrid based on the actual, hidden
> numeric "seconds" column.  This too works fine, except, I am not  
> getting
> any visible clues on my converted column header to indicate that the
> column has been sorted.  No up/down arrows and no shading.
>
> My code tracks which column was really sorted and what the sort  
> order is
> (ASC or DESC).  Is there any way I can replicate the Column shading  
> and
> sort order arrow on this converted column to match what would be the  
> case
> if I were clicking on the hidden column?

It doesn't look like it appears in the API docs but the lesson on  
sorting mentions the command HiliteAndStoreSortByColumn.

<http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7330-How-Do-I-Customize-or-Disable-Column-Sorting- 
 >

HiliteAndStoreSortByColumn COLUMN_NAME

I think that should do what you need.

-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com



More information about the use-livecode mailing list