Notice
Recent Posts
Recent Comments
Link
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
Archives
Today
Total
관리 메뉴

pierrot_98

[델파이] 그리드 헤더 정렬 본문

IT/Delphi

[델파이] 그리드 헤더 정렬

pierrot_98 2019. 9. 16. 19:44
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
procedure TForm1.AdvcClickCell(Sender: TObject; ARow,ACol:Integer);
var
  bAscending : Boolean;
  strbuf : String;
begin
  if ARow > 0 then
    Exit;
  
  with Advc do
  begin
    if(SortSettings.Direction = sdAscending) then
      bAscending := False
    else
      bAscending  := True;
 
    //정렬
    SortSettings.Full := True;
    SortIndexes.Clear;
    SortIndexes.AddIndex(ACol,bAscending);
    QSortIndexed;
 
    SortSettings.Column := ACol;
    if bAscending then
      SortSettings.Direction := sdAscending
    else
      SortSettings.Direction := sdDescending
  end;
end;
cs

 

스트링그리드 헤더 클릭 시 오름/내림차순 정렬

'IT > Delphi' 카테고리의 다른 글

[델파이] ShellExecute  (0) 2019.09.24
[델파이] 폴더 생성  (0) 2019.09.24
[델파이] 색상 Color  (0) 2019.09.16
[델파이] TQRMemo  (0) 2019.09.16
[델파이] StringReplace  (0) 2019.09.16
Comments