Autor Beitrag
Björn karpenstein
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 96

Windows XP, Linux
D7, K3
BeitragVerfasst: Mo 22.08.05 15:00 
Hallo ich möchte mir auf eine Zeile, auf die Doppelgeklickt wird, in einem TStringGrid die erste Spalte ausgeben laseen. Weiss jdm. wie das geht?

Fülle die Tabelle folgendermaßen.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
  SQLDataSet1.Open;
    while (SQLDataSet1.Eof <> true) do
    begin
      StringGrid1.RowCount := i+1;
      StringGrid1.Rows[i].Strings[0]:= SQLDataSet1.fieldByName('artikelnummer').AsString;
      StringGrid1.Rows[i].Strings[1]:= SQLDataSet1.fieldByName('bezeichnung').AsString;
      StringGrid1.Rows[i].Strings[2]:= SQLDataSet1.fieldByName('eannummer').AsString;
      StringGrid1.Rows[i].Strings[3]:= SQLDataSet1.fieldByName('vk1').AsString;
      Inc(i);
      SQLDataSet1.Next;
    end;
  SQLDataSet1.Close;
rochus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 416

Win XP Prof, Fedora Core 4, SuSE 7.0
D7 Ent, D2005 Pers
BeitragVerfasst: Mo 22.08.05 15:12 
im OnDblClick so:

ausblenden Delphi-Quelltext
1:
  ShowMessage('Der Wert ist: ' + StringGrid.Cells[0,StringGrid.Row]);					


have fun!

_________________
Im Nachhinein ist man immer ein Schlauch!
"Dream as if you'll live forever, live as if you'll die today!" James Dean
Björn karpenstein Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 96

Windows XP, Linux
D7, K3
BeitragVerfasst: Mo 22.08.05 15:17 
100-prozentig danke!!! :)