Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QuantumGrid dblclick problem

Status
Not open for further replies.

lszb75

Technical User
Apr 4, 2003
5
HU
How can I select a row by double clicking on it within a quantumgrid? The problem is that the dblclick event also triggers when I click on the headers of the grid.
 
Is the grid column header sharing the same event code or does this trigger the rows double click event ?
Could you not either make use of a flag to determine which of these events is being triggered ?
Or alternatively when the event is triggered (assuming code is same between two actions) can you not determine the current cursor position and establish whether or not you have clicked on a data row or the column headers ?
Hope that this helps
Steve
 
The whole grid (header, rows, empty grid space) has one dblclick event. I want to select the row by dblclick on it.
Hoq can I seperate the code?
 
Not sure about a quantumgrid, but in a normal StringGrid after a click event you can check the .Row property to see what row you are on.

Could you not add code at the beginning of your procedure such as:

if sg.Row = 0 then
exit;

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top