Arsip: klik cell di dbgrid

 
user image
more 14 years ago

dauf

Salam knal ma temen2 smua. aq pendatang baru nih. aq punya masalah dg dbgrid. Gimana caranya nampilin isi cel di salah satu field dalam dbgrid ketika kita klik cell tersebut. Aq dah coba pke perintah: Adoquery1.connection:=adoconnection1; adoquery1.sql.text:='select * from namatabel'; adoquery1.connection:=true; adoquery1.RecNo:=3; label1.caption:=adoquery1.fiels[1].asstring; tpi hasil yg diproleh hanya isi cell di record no tiga saja, walaupun kta klik pda cell yang lain. Gmana ya spya isi label1.caption sama dengan isi cell yang terpilih? aq minta bantuannya pda temen2. :( :? :)
user image
more 14 years ago

cyber_hecker

hilangkan perintah : adoquery1.RecNo:=3;
user image
more 14 years ago

dauf

Dah aq coba ngilangin.dan aq tulis: Adoquery1.connection:=adoconnection1; adoquery1.sql.text:='select * from namatabel'; adoquery1.connection:=true; label1.caption:=adoquery1.fiels[1].asstring; tpi hasilnya yang tampil hnya isi cel di recor ke satu. pa da solusi? :) :)
user image
more 14 years ago

cyber_hecker

loh ? emangnya listing program mu diletakkan dimana ? coba letakkan : onShow / onCreate : ADOQuery1.Connection := ADOConnection1; ADOQuery1.SQL.Text := 'SELECT * FROM NamaTabel'; ADOQuery1.Open; onDBGridCellClick : Label1.Caption := ADOQuery.Fields[1].AsString;
user image
more 14 years ago

dauf

Wah makasih broo, dah aq coba and lancar.thanks!
user image
more 14 years ago

nurez

tambahan... klo mau isi 1 record / lebih bagaimana..?
user image
more 14 years ago

Bahrul_power

Ga usah bingung, pakai cara ini aja ga usah pakai trik mas.. label1.caption:=adoquery1.fiels[1].asstring+' '+adoquery1.fiels[2].asstring+ dan seterusnya..... ; kalo mau nampilin lebih dari 1 record pakai bookmark aja mas......
user image
more 14 years ago

nurez

hmm brati ngekliknya bisa 5 x 100 =500 klik :) klo pakai bookmarks..? maksudnyaa? @ b-4 trims..
user image
more 14 years ago

Bahrul_power

yu i begitu kira-kira
user image
more 14 years ago

nurez

aaaaaaaaaaaaaaaaaaaa :( iya dehh... :)
more ...
  • Pages:
  • 1
Share to

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com