Solved

OnMouseUp event missing from TDBGrid

Posted on 1997-06-18
1
425 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need Delphi function to get Youtube video title 5 225
Delphi : could not find program, '...exe' 2 148
error 1.1 400 Bad request idhttp delphi 18 55
Dev Express grid collapse 2 39
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now