Re: Grids with Re-order functionality




"John" <JohnWKerns@xxxxxxxxxxx> wrote
> I'm looking for a StringGrid that allows a user to re-order
> rows by drag-drop.

By drag-drop? I you just wanted to move the rows by the
ordinary drag, then it is, of course, built in. See below.
--JohnH

procedure TForm1.FormCreate(Sender: TObject);
var c, r: integer;
begin
StringGrid1.Options := StringGrid1.Options
+ [goRowMoving,goRowSelect];
For c := 0 to StringGrid1.ColCount - 1 do
for r := 0 to StringGrid1.RowCOunt - 1 do begin
StringGrid1.Cells[c,r]
:= Format('%s%d',[char(c + ord('A')),r]);
end;
end;

>
> Thanks for any suggestions.
> John
>
>
.