Solved

OnMouseUp event missing from TDBGrid

Posted on 1997-06-18
1
439 Views
Last Modified: 2008-03-06
The TDBGrid has an OnKeyUp event but there is no OnMouseUp event.  How can
I tell if the user has moved into a differant row using the scroll bar?  The OnColEnter event doesn't work since the column is the same.  The OnMouseUp event for the form only works if the form has focus.
0
Comment
Question by:mkaminski
[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
1 Comment
 
LVL 5

Accepted Solution

by:
ronit051397 earned 100 total points
ID: 1337187
Use the event 'OnDataChange' which is related to the datasource which is connected to the dbgrid.
Each time another record becomes the current  record, either by user selection or by doing something in your code, this event occurs. to treat changing the current record only by user selection you can write the following:

procedure TForm1.DataSource1DataChange(Sender: TObject; Field: TField);
begin
  if DBGrid1.Focused then  //if the user selected another record
  begin
  ...............
  end;
end;

0

Featured Post

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
code issue 8 188
How to call a form that is in a DLL  from an application? 13 88
scroll down TListBox component in Delphi 1 31
Browsing a TTreeView in Delphi 5 32
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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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