my code,
CN = Me.LNR.Caption is refred from a label in red is the number of filled rows.
On second clik on GIORNO have a blank rows!
Note:
i have a hide column 10 where numeric value, filled with:
.TextMatrix(R, 10) = Format(STRDBROW(1, K), "yyyymmddhhnnss")
is the formatted dta GIORNO
Private Sub MSFlexGrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
'1-flexSortGenericAscending
'2-flexSortGenericDescending
'3-flexSortNumericAscending
'4-flexSortNumericDescending
'5-flexSortStringNoCaseAsending
'6-flexSortNoCaseDescending
'7-flexSortStringAscending
'8-flexSortStringDescending
Dim CL As Integer, RW As Integer, CN As Long
With Me.MSFlexGrid1
RW = .MouseRow
If Me.LNR.Caption >= 1 Then
CN = Me.LNR.Caption
If .MouseCol = 1 And Button = vbLeftButton And RW = 0 Then
.Redraw = False
.RowSel = CN
.Col = 10
If strSort = 1 Then
.Sort = 3
strSort = 2
Else
.Sort = 4
strSort = 1
End If
.TopRow = 1
.Redraw = True
End If
End If
End With
Me.Text1.SetFocus
End Sub
CN = Me.LNR.Caption is refred from a label in red is the number of filled rows.
On second clik on GIORNO have a blank rows!
Note:
i have a hide column 10 where numeric value, filled with:
.TextMatrix(R, 10) = Format(STRDBROW(1, K), "yyyymmddhhnnss")
is the formatted dta GIORNO
Private Sub MSFlexGrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
'1-flexSortGenericAscending
'2-flexSortGenericDescending
'3-flexSortNumericAscending
'4-flexSortNumericDescending
'5-flexSortStringNoCaseAsending
'6-flexSortNoCaseDescending
'7-flexSortStringAscending
'8-flexSortStringDescending
Dim CL As Integer, RW As Integer, CN As Long
With Me.MSFlexGrid1
RW = .MouseRow
If Me.LNR.Caption >= 1 Then
CN = Me.LNR.Caption
If .MouseCol = 1 And Button = vbLeftButton And RW = 0 Then
.Redraw = False
.RowSel = CN
.Col = 10
If strSort = 1 Then
.Sort = 3
strSort = 2
Else
.Sort = 4
strSort = 1
End If
.TopRow = 1
.Redraw = True
End If
End If
End With
Me.Text1.SetFocus
End Sub