Results 1 to 5 of 5

Thread: msflexgrid

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 1999
    Location
    St. Louis, MO USA
    Posts
    21

    Exclamation msflexgrid

    I am using a flex grid and have 7 columns (0-6)..I am using selection mode flexselectionbyrow in order to highlight the whole row when I select any column from the row the user wants to delete. The problem is the 0 column is the key column (the unique field that distinguishes the record) and I need to assign this to the variable in order to delete the correct record.
    When I assign the variable the text from the row it is from row 1....how do I assign it row 0's text?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    from what i've understood

    flex.TextMatrix(flex.Row, 0)

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 1999
    Location
    St. Louis, MO USA
    Posts
    21
    Any suggestion has to use this to delete/highlight multiple rows.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    When I want to highlight a whole bunch of rows in an MSFlexGrid, I like to use the Right Mouse Button, so I use this code. However, if you prefer using the Left Mouse Button, then just modify this accordingly.
    VB Code:
    1. Private Sub MSFlexGrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    2. If Button = vbRightButton Then
    3.      With MSFlexGrid1
    4.         .Row = .MouseRow
    5.         .Col = .MouseCol
    6.      End With
    7. End If
    8. End Sub
    9.  
    10. Private Sub MSFlexGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    11. If Button = vbRightButton Then
    12.        With MSFlexGrid1
    13.          .ColSel = .MouseCol
    14.          .RowSel = .MouseRow
    15.        End With
    16. End If
    17. End Sub

  5. #5
    Jethro
    Guest
    Chuck in a sneaky bit of code after highlighting...

    Code:
    flexigrid.row = 0
    flexigrid.col = 0
    
    Variable = flexigrid
    
    ' Am persuming the .text is the default property for flexigrids
    That should do the trick without upsetting the highlighting.

    Hope that helps...

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