If e.Col.Name = "单价" OrElse e.Col.Name = "图纸" Then If e.Row.Isnull("单价") = False And e.Row.Isnull("图纸") = False e.Row.Locked = True Else e.Row.Locked = False End If End If