-- 作者:有点甜
-- 发布时间:2017/7/27 11:41:00
--
要写代码,在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
|