Einzelnen Beitrag anzeigen

dopeline

Registriert seit: 7. Mär 2003
Ort: Berlin
304 Beiträge
 
Delphi 7 Enterprise
 
#2
  Alt 13. Mai 2003, 13:53
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
  Mit Zitat antworten Zitat