AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein GUI-Design mit VCL / FireMonkey / Common Controls Delphi Ausgewählte Zeilen e. Stringgrid's i.e. anderes Stringgrid
Thema durchsuchen
Ansicht
Themen-Optionen

Ausgewählte Zeilen e. Stringgrid's i.e. anderes Stringgrid

Ein Thema von aaron · begonnen am 24. Mär 2008 · letzter Beitrag vom 24. Mär 2008
Antwort Antwort
mkinzler
(Moderator)

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

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

  Alt 24. Mär 2008, 12:48
Ich hab es mal mit normalen StringGrids getestet, funktioniert

Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    StringGrid1: TStringGrid;
    StringGrid2: TStringGrid;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  i, x2: integer;
begin
  for i := 1 to StringGrid1.RowCount -1 do
    for x2 := 1 to StringGrid1.ColCount-1 do
    begin
      //if stringgrid1.GetCheckBoxState(0,i,state) then
      begin
        //if state = true then
            StringGrid2.Cells[i, x2]:=StringGrid1.Cells[i, x2];
      end;
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  StringGrid1.rows[0].CommaText := 'Spalte1, Spalte2, Spalte3';
  StringGrid1.rows[1].CommaText := 'blabla, a , b, c';
  StringGrid1.rows[2].CommaText := 'ablabl, 1 , 2, 3';

end;

end.
Angehängte Grafiken
Dateityp: png sg_116.png (27,5 KB, 7x aufgerufen)
Markus Kinzler
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:51 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz