1、drawcell事件
if val(e.text) > 100 then e.Table.DataTable.AddUserStyle("样式1", Color.red, Color.black) e.Style = "样式1"End If
2、DataColChanging事件
If val(e.NewValue) > 100 Then msgbox("不能超过100") e.cancel = TrueEnd If