Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 20th, 2012, 02:13 AM
icuras icuras is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 165 icuras User rank is Sergeant Major (2000 - 5000 Reputation Level)icuras User rank is Sergeant Major (2000 - 5000 Reputation Level)icuras User rank is Sergeant Major (2000 - 5000 Reputation Level)icuras User rank is Sergeant Major (2000 - 5000 Reputation Level)icuras User rank is Sergeant Major (2000 - 5000 Reputation Level)icuras User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 4 h 42 m 59 sec
Reputation Power: 36
Delphi and dbgrid

I have a dbgrid. If i click on a line a populate a textbox with somedata out of the grid. Works nice i use the oncellclick event. now on the far left you have an arrow wich you can use to select a line in the grid. only problem is it doe snot reconize the onclick event if you click there so there for my textbox dont get any info on it.

I dont know really what to search for on the net or how to explain it beter.

any ideas?

Reply With Quote
  #2  
Old July 20th, 2012, 08:19 AM
majlumbo majlumbo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2008
Posts: 251 majlumbo User rank is Lance Corporal (50 - 100 Reputation Level)majlumbo User rank is Lance Corporal (50 - 100 Reputation Level)majlumbo User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 Days 22 h 50 m 14 sec
Reputation Power: 5
I'm assuming you are talking about the arrow that is within the dbgrid. That "column" is not a cell based on a field in your database so that is why the oncellclick is not firing.

Perhaps you can use the "AfterScroll" event of your table/query component, and populate the textbox with a default field value from the new record. One drawback is if you click the arrow on the currently selected row, the event won't fire.

Reply With Quote
  #3  
Old July 20th, 2012, 11:07 AM
icuras icuras is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 165 icuras User rank is Sergeant Major (2000 - 5000 Reputation Level)icuras User rank is Sergeant Major (2000 - 5000 Reputation Level)icuras User rank is Sergeant Major (2000 - 5000 Reputation Level)icuras User rank is Sergeant Major (2000 - 5000 Reputation Level)icuras User rank is Sergeant Major (2000 - 5000 Reputation Level)icuras User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 4 h 42 m 59 sec
Reputation Power: 36
Re

Thanks.I used the mouse over.Some reason that work!!

Thanks for your help in anycase.Much appreciate it!!

Reply With Quote
  #4  
Old July 20th, 2012, 03:30 PM
clivew clivew is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 2,045 clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 37 m
Reputation Power: 382
Somewhat off topic observation you should feel free to ignore

My own personal experience over many years is that using dbGrids with SQL databases
for anything other than read only displays or simple editing situations (like maintaining lookup tables),
eventually comes back to bite me.
The extra effort involved in using grids that are not db aware and managing the database
interaction myself has paid off handsomely.

Clive

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > Delphi and dbgrid

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap