Sorting datagrid column with a tricj?

Bob Sneidar bobsneidar at iotecdigital.com
Fri Nov 2 17:14:17 EDT 2018


There is no way I know of to have a datagrid sort by an invisible column and still show that it is sorted by a visible one. Every time the datagrid "redraws" it's going to update the appearance of the header to reflect the sort. 

If you want to force the sort when you populate the datagrid, then set the dgProp ["sort by column"] of the datagrid to the column you want, and then if the user sorts by a different column, well that's on them. 

Bob S


> On Nov 2, 2018, at 13:13 , Klaus major-k via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi all,
> 
> given a datagrid (table) with three columns
> C1 -> visible
> C2 -> visible
> C3 -> invisible column
> 
> Is it possible to sort a datagrid by column C3, although 
> the user has clicked the header of column C2.
> Know what I mean?
> 
> If this is possible, any hints on how to do this are highly appreciated.
> 
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> http://www.major-k.de
> klaus at major-k.de
> 
> 
> _______________________________________________
> 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