- Imports GrapeCity.Win.MultiRow
- Public Class Form1
- Dim i As Integer = 1
- Private Sub GcMultiRow1_CellClick(ByVal sender As Object, ByVal e As GrapeCity.Win.MultiRow.CellEventArgs) Handles GcMultiRow1.CellClick
- If (e.CellName = "headercell1") Then
- Dim sortorder As SortOrder = i Mod 2 + 1
- Dim sortitem1 As New SortItem
- sortitem1.CellName = "Cell1"
- sortitem1.SortOrder = sortorder
- Dim sortitem2 As New SortItem
- sortitem2.CellName = "Cell2"
- sortitem2.SortOrder = sortorder
- Dim mySort() As SortItem = {sortitem1, sortitem2}
- Me.GcMultiRow1.Sort(mySort)
- TryCast(Me.GcMultiRow1.ColumnHeaders(0).Cells("headercell1"), ColumnHeaderCell).SortGlyphDirection = sortorder
- i = i + 1
- End If
- End Sub
- End Class
复制代码 |