|
-
Mar 20th, 2002, 01:07 PM
#1
Thread Starter
Junior Member
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?
-
Mar 20th, 2002, 01:28 PM
#2
from what i've understood
flex.TextMatrix(flex.Row, 0)
-
Mar 20th, 2002, 01:30 PM
#3
Thread Starter
Junior Member
Any suggestion has to use this to delete/highlight multiple rows.
-
Mar 20th, 2002, 02:59 PM
#4
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:
Private Sub MSFlexGrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbRightButton Then
With MSFlexGrid1
.Row = .MouseRow
.Col = .MouseCol
End With
End If
End Sub
Private Sub MSFlexGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbRightButton Then
With MSFlexGrid1
.ColSel = .MouseCol
.RowSel = .MouseRow
End With
End If
End Sub
-
Mar 20th, 2002, 03:28 PM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|