通过代码修改字段组中字段的可编辑性
Modify editability of a field from field group by code
我有这段代码:
controlDetails = this.form().design(1).addControl(FormControlType::Group, #quickCreateDetails);
controlDetails.dataSource(fbds.id());
controlDetails.dataGroup(#quickCreateDetails);
controlDetails.frameType(10);
controlDetails.autoDataGroup(true);
controlDetails.hideIfEmpty(false);
controlDetails.columns(2);
我想修改该数据组上某个字段的可编辑性,但我不知道如何使用代码或在 AOT (DS) 中进行。看来我很有限...
您有下一个选项:
更改表单数据源提交的可编辑性
- 通过 AOT - https://msdn.microsoft.com/EN-US/library/aa860145.aspx
- 通过代码 FormDataSource.object:
InventTrans_ds.object(fieldNum(InventTrans, Qty)).allowEdit(false)
更改子控件设计 属性。 addControl
returns FormBuildGroupControl
. Then you have to loop through controlNum(), find correct design control and cast it to one of FormBuildControl nested type with data bounding. There you have allowEdit
方法。
我有这段代码:
controlDetails = this.form().design(1).addControl(FormControlType::Group, #quickCreateDetails);
controlDetails.dataSource(fbds.id());
controlDetails.dataGroup(#quickCreateDetails);
controlDetails.frameType(10);
controlDetails.autoDataGroup(true);
controlDetails.hideIfEmpty(false);
controlDetails.columns(2);
我想修改该数据组上某个字段的可编辑性,但我不知道如何使用代码或在 AOT (DS) 中进行。看来我很有限...
您有下一个选项:
更改表单数据源提交的可编辑性
- 通过 AOT - https://msdn.microsoft.com/EN-US/library/aa860145.aspx
- 通过代码 FormDataSource.object:
InventTrans_ds.object(fieldNum(InventTrans, Qty)).allowEdit(false)
更改子控件设计 属性。
addControl
returnsFormBuildGroupControl
. Then you have to loop through controlNum(), find correct design control and cast it to one of FormBuildControl nested type with data bounding. There you haveallowEdit
方法。