要写代码,在datacolchanged事件写代码
If e.DataCol.name = "日期" Then
If e.NewValue = Nothing Then
e.DataRow("第一列") = Nothing
Else
Dim gc As System.Globalization.GregorianCalendar = new System.Globalization.GregorianCalendar()
Dim weekOfYear As Integer = gc.GetWeekOfYear(e.newvalue,System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Monday)
e.DataRow("第一列") = weekOfYear
End If
End If