Datagrid - Selecting a line after sorting ..

Trevor DeVore lists at
Fri Apr 9 09:26:59 EDT 2010

On Apr 8, 2010, at 11:03 PM, JACK RARICK wrote:

> I have a datagrid with one hundred rows and six columns. The user  
> clicks on a "cell" somewhere in the middle of the grid that  
> immediately performs an action and resorts the grid. The row number  
> is stored - but how do I get the original line "reselected" so the  
> user knows where he was?

Grab the dgHilitedIndex before you sort and then set the  
dgHilitedIndex after performing the sort. Using the index allows you  
to track rows in the Data Grid regardless of sort order.

Trevor DeVore
Blue Mango Learning Systems
Releasable Revolution Resources for Developers:

More information about the Use-livecode mailing list