Click to See Complete Forum and Search --> : VSFLEXGRID HEADER- URGENT
September 29th, 1999, 03:31 PM
I'm not able to suppress the Grids double_click event when a user double clicks on the header I mean on the first row where the column headings are given.
I assign the column heading to .row = 0, and the .fixedrow = 1.
So If the user double clicks on row 0 which is the first row containing the col names everytime the .row is displayed as 1.
.row = 1 and the double click event fires with respect to the first row that contains the data.
Can anybody please help.
Chris Eastwood
September 29th, 1999, 03:55 PM
You'll need to check which row the mouse is on/over in the double-click event - use the FlexGrid's '.MouseRow' property for this.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
September 29th, 1999, 04:14 PM
The mouserow property fro VSflex grid returns 0 all the time.
Where ever I do a double click in any row it exits the function 'cose I have checked in the Dbl click event.
If grdProject.MouseRow = 0 Then Exit Sub
it is always 0 and it exits the function.
Chris Eastwood
September 29th, 1999, 04:49 PM
Hasn't that solved your problem ?
The '.FixedRows' property tells you how many fixedrows your grid has - in this case 1 which relates to Row 0. The FlexGrid will say it's at '.Row 1' because FixedRows aren't supposed to be able to get focus from the user - i(although you can set them through code).
ie. Clicking on fixed row 0 sets focus in the grid.row property to 1
How about putting some code in your flexgrid_mouse move event to output the mouserow property - it should always change (even when you are debugging, so be careful).
Mind you, I'm doing this on the MSFlexGrid which is *supposed* to be the same (kind-of) according to M$.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.