Solved

OnMouseUp event missing from TDBGrid

Posted on 1997-06-18
1
419 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

18 Experts available now in Live!

Get 1:1 Help Now