用下面这个写法,排序可以实现了。不过好像SortInfo里不能指定是否显示排序的三角符号?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim si(2) As FarPoint.Win.Spread.SortInfo
si(0) = New FarPoint.Win.Spread.SortInfo(0, True)
si(1) = New FarPoint.Win.Spread.SortInfo(1, True)
si(2) = New FarPoint.Win.Spread.SortInfo(2, True)
FpSpread1.ActiveSheet.SortRows(0, FpSpread1.ActiveSheet.RowCount, si)
End Sub |