procedure TMytstringgrid.HeaderClick(Column: TColumn);
var
header: theader;
id: Integer;
begin
header := THeader(self.FindStyleResource('header'));
id := Column.Index;
if header.Items[id].TagString = '' then
begin
header.Items[id].TagString := '▲';
self.sort(id, true);
end
else if header.Items[id].TagString = '▲' then
begin
header.Items[id].TagString := '▼';
self.sort(id, false);
end
else if header.Items[id].TagString = '▼' then
begin
// header.Items[id].TagString := '';
header.Items[id].TagString := '▲';
self.sort(id, true);
end;
for var i := 0 to header.Count - 1 do
begin
if i <> id then
header.Items.TagString := '';
end;
end;
|