Solved

MORE EASY POINTS! QUICK 50!

Posted on 1998-01-21
2
146 Views
Last Modified: 2010-04-04
How do you select data from a grid and have it appear in an editbox.  In other words if I have a grid with data such as customers and want to be able to select one by double-clicking how can I do that?

Tony
0
Comment
Question by:aj85
2 Comments
 

Author Comment

by:aj85
ID: 1357253
Need answer if possible ASAP...
0
 
LVL 2

Accepted Solution

by:
mvz121697 earned 50 total points
ID: 1357254
The simplest way is to use the Ttable (or Tquery)
where the dbgrid is linked to.

In the OnDblClick-event of the dbgrid you can:

procedure TForm1.DBGrid1DblClick(Sender: TObject);
begin
   Edit1.Text:=Table1.FieldByName('FirstName').asstring;
end;
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question