Professional Documents
Culture Documents
Example Delphi - Delete Row in TStringGrid Component
Example Delphi - Delete Row in TStringGrid Component
com
i,j:integer; begin for i := Arow to AStringGrid.RowCount - 2 do begin for j := 0 to AStringGrid.ColCount - 1 do begin AStringGrid.Cells[j,i] := AStringGrid.Cells[j,i+1]; end; end; AStringGrid.RowCount := AStringGrid.RowCount-1; end; procedure TForm1.Button1Click(Sender: TObject); var SelectedRow:integer; begin //Click to the row you want to delete SelectedRow := StringGrid1.Row; DeleteStringGridRow1(StringGrid1,SelectedRow); end; end.