if e.DataCol.Name = "第二列" Then Dim bjs As List(Of String) = DataTables("表A").GetUniqueValues("","第二列") For Each bj As String In bjs Dim drs As List(Of DataRow) = DataTables("表A").Select("", "第二列 DESC") For n As integer = 0 To drs.Count - 1 drs(n)("排序") = n + 1 Next Next End If