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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSFlexgrid fixedrow problem

Status
Not open for further replies.

JBG

Programmer
Oct 22, 2001
99
US
I have a VB6 app with an MSFlexgrid control.

The first row (index 0) is a fixedrow and I use it for column headers.

However, when I dbl click on that physical first row (a fixed row - index 0)) on any column, grid.row always returns "1" rather than "0". When I click ON the physcial second row (non-fixed, index 1), grid.row also returns "1".

It appears that the dbl click event cannot be accurately fired on a fixed row. Is this correct?

I need to know wheter a user has clicked on the physical first row (fixed - index 0) so I can launch the sort routine, or has clicked on the physcial second row of data (index 1).

Hope this makes sense, and if so, anyone have any ideas on how to get the dbl click event in an MSflexgrid to fire properly (that is, return the row if the dbl click occurs on a fixed row)?

Thanks,
JBG
 
grid.row returns the row that has focus not that which was clicked on. As a fixed row can't have focus it returns row 1.

You could probably do it by defining 0 fixed rows or overlaying the column headers with another control to get the click event.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
cool. I also just discover the .mouserow property. It does the trick too..

I appreciate the reply. I hd not thought about laying a control over it (the column header)....

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top