Click事件中 v_sortInfo(0)是从新New的,而且没有元素1的。只有0的,不明白你说的不一致 是什么意思
Private Sub FpSpread1_CellClick(sender As Object, e As FarPoint.Win.Spread.CellClickEventArgs) Handles FpSpread1.CellClick
If sort_flg = False Then
sort_flg = True
Else
sort_flg = False
End If
'Me.FpSpread1_Sheet1.SortRows(0, sort_flg, True)
Dim v_sortInfo(0) As FarPoint.Win.Spread.SortInfo
v_sortInfo(0) = New FarPoint.Win.Spread.SortInfo(0, sort_flg, System.Collections.Comparer.Default)
Me.FpSpread1_Sheet1.SortRows(0, Me.FpSpread1_Sheet1.RowCount, v_sortInfo)
End Sub |