BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DoubleClick a DBGrid Row

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Students
View previous topic :: View next topic  
Author Message
Charlie
Guest





PostPosted: Thu Mar 29, 2007 4:28 am    Post subject: DoubleClick a DBGrid Row Reply with quote



Hi, I'm using Delphi 5cs, dBase files.
I want to be able to double click a row in a dbGrid and pass the record to
components in another form. Specifically the dbGrid's records are fields
from the orders table. I'd like to find a particular order in the grid,
double click and open a form where I can view and/or edit the order.
Thank you,
Charlie
Back to top
Robin
Guest





PostPosted: Mon May 21, 2007 8:12 am    Post subject: Re: DoubleClick a DBGrid Row Reply with quote



Charlie wrote:
Quote:
Hi, I'm using Delphi 5cs, dBase files.
I want to be able to double click a row in a dbGrid and pass the record to
components in another form. Specifically the dbGrid's records are fields
from the orders table. I'd like to find a particular order in the grid,
double click and open a form where I can view and/or edit the order.
Thank you,
Charlie

Hi Charlie,

When you click on the row, (single or double) you have selected that row
in the underlying dataset (table?).

This means you can reference the dataset/table directly. Like this:

Table1.FieldByName('MyField').AsString;

You see, in data-aware components like the DBGrid, when you select a row
the dataset underneath follows and also selects that row. Makes your
life nice and easy.

--
Robin.

Australian Bridal Accessories := http://www.bridalbuzz.com.au
Turbo for Noobs (a work in progress) := http://turbofornoobs.blogspot.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Students All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.