已解决
我在SDK找到显示格式化字符串是DisplayFormatString
通过上图的代码改变不了此属性值
业务场景:
单据中有一列费用率是4位百分比显示,针对不同单据类型,有时需要显示正常的小数,而不是百分比。
找到解决方法了:
base.AfterBindData(e);
DecimalFieldAppearance control_F_ZJ_JN_FYL = (DecimalFieldAppearance)this.View.GetControl("F_ZJ_JN_FYL").ControlAppearance;
control_F_ZJ_JN_FYL.DisplayFormatString = "P3";
DecimalFieldAppearance control_F_ZJ_MN_FYL = (DecimalFieldAppearance)this.View.GetControl("F_ZJ_MN_FYL").ControlAppearance;
control_F_ZJ_MN_FYL.DisplayFormatString = "P2";
DecimalFieldAppearance control_F_ZJ_HN_FYL = (DecimalFieldAppearance)this.View.GetControl("F_ZJ_HN_FYL").ControlAppearance;
control_F_ZJ_HN_FYL.DisplayFormatString = "P1";
this.View.UpdateView("F_ZJ_JN_FYL");
this.View.UpdateView("F_ZJ_MN_FYL");
this.View.UpdateView("F_ZJ_HN_FYL");