unit Gridmv;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, Grids;
type
TGridMV = class(TStringGrid)
public
procedure RowMoved(FromIndex, ToIndex: Longint);
override;
procedure Insert(ToIndex: Longint);
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Samples', [TGridMV]);
end;
procedure TGridMv.RowMoved(FromIndex, ToIndex: Longint);
begin
inherited RowMoved(FromIndex, ToIndex);
end;
{This will insert a row before the row selected.}
procedure TGridMv.Insert(ToIndex: Longint);
begin
RowCount := RowCount + 1;
RowMoved(RowCount, ToIndex);
end;
end.