Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2009, 04:43 PM
beh.tehrani beh.tehrani is offline
Senior Member
 
Join Date: Mar 2009
Posts: 316
Default show DBGrid1 columns in edit box

hello

i want if click on DBGrid1, columns data show in edit box

thanks

i'm using delphi 2009
Reply With Quote
  #2  
Old 04-15-2009, 04:49 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default RE: show DBGrid1 columns in edit box

[DELPHI]//(2) Use "OnCellClick" event of the DBGrid. Example:

procedure TForm2.DBGrid1CellClick(Column: TColumn);
begin
Edit1.Text := ADOTable1.FieldByName('name').AsString;
Edit2.Text := ADOTable1.FieldByName('tell').AsString;
end;[/DELPHI]

Regards,
Abdulaziz Jasser
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:07 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.