Polygrid sorting

Paul Dupuis paul at researchware.com
Fri Aug 25 07:04:21 EDT 2023


Thank you Panos!

I must be going blind not to have seen the example when I clicked on the 
Dictionary entry for the message!

On 8/25/2023 5:16 AM, panagiotis m via use-livecode wrote:
> 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 <
> use-livecode at lists.runrev.com> 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
>> 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
>>
> _______________________________________________
> 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