【已解决】如何通过代码创建单据体 基础资料 类型字段
金蝶云社区-王兴旺
王兴旺
0人赞赏了该文章 2,048次浏览 未经作者许可,禁止转载编辑于2015年09月28日 08:28:08

需求场景:
需要通过代码动态生成单据体的列字段,现在已经可以动态生成简单字段的列,代码如下:
[code]TextField fld = new TextField();
fld.Key = string.Format("F{0}", reader["FElKey"]);
fld.Name = new LocaleValue(string.Format("Name{0}", reader["FElName"]));
fld.PropertyName = reader["FElPropertyName"].ToString();
fld.EntityKey = "FList";
fld.Entity = entity;
_currInfo.Add(fld);

TextFieldAppearance fldApp = new TextFieldAppearance();
fldApp.Key = fld.Key;
fldApp.Caption = fld.Name;
fldApp.EntityKey = fld.EntityKey;
fldApp.Width = new LocaleValue(reader["FApWidth"].ToString());
fldApp.LabelWidth = new LocaleValue(reader["FApLabelWidth"].ToString());
fldApp.Tabindex =(int) reader["FApTabindex"];
fldApp.Field = fld;
_currLayout.Add(fldApp);[/code]需要解决问题:
对于基础资料、组织等复杂类型的字段如何创建?在创建时如何设置绑定信息?