Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Click on DBGrid to use that record...?

Posted on 1999-09-21
6
Medium Priority
?
144 Views
Last Modified: 2010-04-06
HELP HELP HELP

How can I use the specific record which has been selected by a click (on a row of the DBGrid) to use this record to add in a TMemo.

For example: I have a DBGrid on the form, and when I click on a specific row, the value of the field "NAME" must be added in the memobox which is located on that same form.

HELP HELP HELP

Jan van Barchum
0
Comment
Question by:roosiedb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2063596
hi roosiedb,

try this in the onclick event of your dbgrid

memo1.lines.add(dbgrid1.datasource.dataset.FieldByName('Name').AsString);

meikl ;-)

0
 
LVL 2

Expert Comment

by:Asem
ID: 2064083
.. or this, if you want the value of the cell, the user clicked at:

procedure TForm1.DBGrid1CellClick(Column: TColumn);
begin
  Memo1.Lines.Add(Column.Field.AsString);
end;
0
 
LVL 7

Expert Comment

by:jconde
ID: 2065030
What really happens when you click on a record in a DBGrid is your changing the current-record pointer to the selected record.  Keeping that in mind, all you need to do is what kretzschmar and/or asem stated (which is the same) !
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:roosiedb
ID: 2065684
It worked perfect !!
How can I give you (kretzschmar) the points?
Thank you for your help.

Jan van Barchum.
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 200 total points
ID: 2065730
hi roosiedb,

well, glad to helped you,
good luck again
(now, after i posted this,
you are able to grade)

meikl ;-)
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6864503
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

688 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