Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DBGrid click

Posted on 1999-07-22
4
Medium Priority
?
223 Views
Last Modified: 2010-04-04
Hi, Does any one know how to determine which dbgrid header is clicked in the doubleclick event of a dbgrid?

presently using this:
  DBGrid1.SelectedColumn.FieldName

but this requires a click within a column, and not the column header...

Rob.

0
Comment
Question by:RBertora
[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
  • 2
  • 2
4 Comments
 
LVL 7

Author Comment

by:RBertora
ID: 1390472
Presently doing this
  if DBGrid1.SelectedField.FieldName = 'FirstName' then
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1390473
hmm rob,

dbgrid provides a ontitleclick-event

sample
procedure TForm1.DBGrid1TitleClick(Column: TColumn);
begin
  showmessage(column.Field.FieldName+' is clicked');
end;

does this help?

meikl
0
 
LVL 7

Author Comment

by:RBertora
ID: 1390474
good comment, full points for posting an answer Meikl :-)
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 160 total points
ID: 1390475
hi rob,

well, glad that this helped you
good luck again

meikl ;-)
0

Featured Post

Industry Leaders: 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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

660 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