Takamine334
asked on
Change record on MSHFlexGrid
How do I change records in an MSHFlexGrid? I have an MSFlexGrid that is able to do this by this code:
If FlexGrid.MouseRow Then
If FlexGrid.MouseCol Then
SavedRow = FlexGrid.Row
SavedCol = FlexGrid.Col
txtEdit.Left = FlexGrid.CellLeft
txtEdit.Top = FlexGrid.CellTop
txtEdit.width = FlexGrid.CellWidth
txtEdit.height = FlexGrid.CellHeight
txtEdit.Text = FlexGrid.Text
txtEdit.SelLength = Len(txtEdit.Text)
txtEdit.Visible = True
txtEdit.SetFocus
End If
Else
If FlexGrid.Tag = CStr(FlexGrid.Col) Then
'FlexGrid.Sort = flexSortStringNoCaseDescen ding
FlexGrid.Tag = vbNullString
SortBy FlexGrid.TextMatrix(0, FlexGrid.Col), True
Else
'FlexGrid.Sort = flexSortStringNoCaseAscend ing
FlexGrid.Tag = FlexGrid.Col
SortBy FlexGrid.TextMatrix(0, FlexGrid.Col), False
End If
End If
But that code doesn't work on my MSHFlexGrid
If FlexGrid.MouseRow Then
If FlexGrid.MouseCol Then
SavedRow = FlexGrid.Row
SavedCol = FlexGrid.Col
txtEdit.Left = FlexGrid.CellLeft
txtEdit.Top = FlexGrid.CellTop
txtEdit.width = FlexGrid.CellWidth
txtEdit.height = FlexGrid.CellHeight
txtEdit.Text = FlexGrid.Text
txtEdit.SelLength = Len(txtEdit.Text)
txtEdit.Visible = True
txtEdit.SetFocus
End If
Else
If FlexGrid.Tag = CStr(FlexGrid.Col) Then
'FlexGrid.Sort = flexSortStringNoCaseDescen
FlexGrid.Tag = vbNullString
SortBy FlexGrid.TextMatrix(0, FlexGrid.Col), True
Else
'FlexGrid.Sort = flexSortStringNoCaseAscend
FlexGrid.Tag = FlexGrid.Col
SortBy FlexGrid.TextMatrix(0, FlexGrid.Col), False
End If
End If
But that code doesn't work on my MSHFlexGrid
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.