headerClick

Typemessage
Dictionarywidget.polygrid
LibraryPolyGrid
Syntax
headerClick <pColumnNumber>
Associationscom.livecode.widget.polygrid
Summary

This message is sent when the table header is clicked.

Parameters
NameTypeDescription
pColumnNumber

The number of the column on which you click.

Example
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
Description

Use the headerClick message to detect when the table header is clicked.

Tagstable,data