for one of my software (not released yet) i made this function:
//Delete a row of a TStringGrid
procedure DeleteRow(StringGrid: TStringGrid; ARow: integer);
var
i, j: integer;
begin
with StringGrid do
begin
for i := ARow to RowCount - 2 do
for j := 0 to ColCount - 1 do
Cells[j, i] := Cells[j, i + 1];
RowCount := RowCount - 1;
end;
end;
You can use call easily:
DeleteRow(sgCampos, sgCampos.Row);
Regards,
Fabien Wang