Datagrid column sorting

Paul Dupuis paul at researchware.com
Mon Mar 20 15:38:44 EDT 2023


With a datagrid, there is a property - the dgProp["sort by column"] of 
group "Data Grid" - which returns (or can be set to) the column name 
that is the current sort column

This corresponds to a property in the Property Inspector, columns tab, 
for the datagrid - a checkbox - labeled "Sort by Column" (or the 
property above "sort by column"). Checking the check box presumably sets 
the datagrid property to the column name

My question for the hivemind is: Is there a way in a Datagrid to may a 
specific column NOT sortable?

It appears when I initially populate the datagrid, I can 'set the 
dgProp["sort by column"] of group "Datagrid" to empty' to ensure NO 
default sorting of the data takes place initially. However, then the 
user can click on the column header and a sort on the column clicked in 
performed whether I want or not.

How can I make, via properties or code, a specific column be 
non-sortable and yet still allow other columns to be sorted on?




More information about the use-livecode mailing list