设置控件锁定性及更新值原创
金蝶云社区-亦木丶
亦木丶
0人赞赏了该文章 686次浏览 未经作者许可,禁止转载编辑于2021年09月16日 16:34:43


//一下两行代码会导致(复选框)单据的锁定性失效(引起原因是SetValue这个函数)

this.View.GetFieldEditor("F_BGJ_Control", Convert.ToInt32(Current["Seq"].ToString()) - 1).SetEnabled("", false);                      this.View.GetFieldEditor("F_BGJ_Control", Convert.ToInt32(Current["Seq"].ToString()) - 1).SetValue("false");

==》

//以下是正确写法

this.View.Model.SetValue("F_BGJ_Control", true, i);                    

this.View.StyleManager.SetEnabled("F_BGJ_Control", Current, "", true);

赞 0