🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database
Article #111

Sorting Coliumns in DBGrid

#111
From: aldapooh
Date: Thu, 11 Sep 2003 11:56
15 lines
1202 bytes
How to sort Columns In DBGrid?
Firstly I've tried this code

for i:= 0 to Grid.ColCount - 1 do
  Grid.Columns[i].Index:= MyIndex

but it doesnt give me the order i want
then wise guys say that it's impossible to change index in for..to..do
because every time i change index all columns rearrange

WHAT SHOULD I DO TO SORT THE COLUMNS?

PS I used DBGrid on TTable with non-persistetn fields

Thanks!!!
Technical Details
Message-ID: <39771b9a.0309110356.1ca7263d@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 115d96,dd779ae43fa0454b,start
X-Google-Attributes: gid115d96,public
X-Google-ArrivalTime: 2003-09-11 04:56:43 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: aldapooh@mail.ru (aldapooh)
Newsgroups: borland.public.delphi.database
Subject: Sorting Coliumns in DBGrid
Date: 11 Sep 2003 04:56:42 -0700
Organization: http://groups.google.com/
Lines: 15
Message-ID: <39771b9a.0309110356.1ca7263d@posting.google.com>
NNTP-Posting-Host: 81.20.101.100
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1063281403 14193 127.0.0.1 (11 Sep 2003 11:56:43 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 11 Sep 2003 11:56:43 GMT