![]() |
Datenbank: Paradox • Version: 7 • Zugriff über: TTable
Tabellendaten---> StringGrid ?
hallo,
hab einen neuen tread aufgemacht, wollte es dort nicht dazuhängen, bei einer listbox geht das also so :
Delphi-Quellcode:
wie geht das,wenn ich die tabellendaten in ein StringGrid anzeigen will ?
procedure TForm1.Button5Click(Sender: TObject);
begin table1.First; ListBox1.Clear; Listbox1.Items.BeginUpdate; while not table1.Eof do begin ListBox1.Items.Add(table1.Fields[0].AsString+', ' +table1.Fields[1].AsString+', ' +table1.Fields[2].AsString); table1.next; end; ListBox1.Items.EndUpdate; ListBox1.ItemIndex := 0; end; mfg vader |
Re: Tabellendaten---> StringGrid ?
Nimm doch ein DBGrid.
|
Re: Tabellendaten---> StringGrid ?
Delphi-Quellcode:
Stringgrid.Cells[x,RecNo]:=Table.Fields[x].asString
|
Re: Tabellendaten---> StringGrid ?
hallo mkinzler,
ja DBGrid wird besser sein, aber wie ändere ich diesen code auf DBGrid um ?
Delphi-Quellcode:
mfg vader
procedure TForm1.Button5Click(Sender: TObject);
begin table1.First; ListBox1.Clear; Listbox1.Items.BeginUpdate; while not table1.Eof do begin ListBox1.Items.Add(table1.Fields[0].AsString+', ' +table1.Fields[1].AsString+', ' +table1.Fields[2].AsString); table1.next; end; ListBox1.Items.EndUpdate; ListBox1.ItemIndex := 0; end; |
Re: Tabellendaten---> StringGrid ?
DataSource auf Form. DBGrid. DataSource auf DataSource setzten DataSource mit Table verbinden.
|
Re: Tabellendaten---> StringGrid ?
mamamia, was so einfach,danke
mfg vader |
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:47 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