Einzelnen Beitrag anzeigen

mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#22

Re: Ausgewählte Zeilen e. Stringgrid's i.e. anderes Stringg

  Alt 24. Mär 2008, 14:38
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
  i, x2, j: integer;
begin
  j := 0;
  for i := 1 to StringGrid1.RowCount - 1 do
  begin
     if stringgrid1.GetCheckBoxState(0, i, state) then
     begin
       if state = true then
       begin
          Inc(j);
          for x2 := 1 to StringGrid1.ColCount - 1 do
          begin
            StringGrid2.Cells[x2, j] := StringGrid1.Cells[x2, i];
          end;
       end;
     end;
  end;
end;
Markus Kinzler
  Mit Zitat antworten Zitat