Link to home
Start Free TrialLog in
Avatar of Takamine334
Takamine334Flag for United States of America

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 = flexSortStringNoCaseDescending
        FlexGrid.Tag = vbNullString
        SortBy FlexGrid.TextMatrix(0, FlexGrid.Col), True
    Else
        'FlexGrid.Sort = flexSortStringNoCaseAscending
        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
Avatar of Sethi
Sethi
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial