我当然知道要换成我自己所对应的单元格名称了,问题就是在于换了之后,还是错误的。
If (e.RowIndex = -1) Then
If e.CellName = "配送予定日" Or e.CellName = "予定時間" Then
Dim sortorder As SortOrder = i Mod 2 + 1
Dim sortitem1 As New SortItem
sortitem1.CellName = "txtYotihiF"
sortitem1.SortOrder = sortorder
Dim sortitem2 As New SortItem
sortitem1.CellName = "txtYoteiTimeF"
sortitem1.SortOrder = sortorder
Dim mySort() As SortItem = {sortitem1, sortitem2}
dw_6.Sort(mySort)
TryCast(dw_6.ColumnHeaders(0).Cells(e.CellName), ColumnHeaderCell).SortGlyphDirection = sortorder
i = i + 1
End If
END |