CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Guest

    VSFLEXGRID HEADER- URGENT

    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.



  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: VSFLEXGRID HEADER- URGENT

    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

  3. #3
    Guest

    Re: VSFLEXGRID HEADER- URGENT

    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.



  4. #4
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: VSFLEXGRID HEADER- URGENT

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured