Hello Paul,
See the example in the dictionary for the "headerClick" message:
local sDirection
on headerClick pColumnNumber
local tText
put the text of me into tText
put not sDirection[pColumnNumber] into sDirection[pColumnNumber]
set the itemDel to tab
# Sort data by this column.
if sDirection[pColumnNumber] then
sort lines of tText ascending by item pColumnNumber of each
else
sort lines of tText descending by item pColumnNumber of each
end if
set the text of me to tText
end headerClick
Kind regards,
Panos
--
On Fri, 25 Aug 2023 at 02:57, Paul Dupuis via use-livecode <
[email protected]> wrote:
> The Polygrid, unlike the Datagrid, has no built in column sorting. You
> have to roll your own.
>
> Before I write my own, has anyone written a column sort (i.e click on a
> column header to sort by it) for a Poly grid they'd care to share?
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode