ok, das problem hab ich schon gelöst:
Delphi-Quellcode:
procedure GridDeleteRow(RowNumber : Integer; Grid : TStringGrid);
Var
i : Integer;
Begin
Grid.Row := RowNumber;
If (Grid.Row = Grid.RowCount -1) Then
Begin
{On the last row}
Grid.RowCount := Grid.RowCount - 1;
End
Else
Begin
{Not the last row}
For i := RowNumber To Grid.RowCount - 1 Do
Begin
Grid.Rows[i] := Grid.Rows[i+ 1];
End;
Grid.RowCount := Grid.RowCount - 1;
End;
End;
----------------------------------------------------------------------
procedure TFormHaupt.SBLoeschenClick(Sender: TObject);
begin
GridDeleteRow(StringGrid1.Row,StringGrid1);
end;
Funzt super!!
Grüße, dopeline