我正在尝试在单个字段上更改allowedit值,但无法进入。但是我收到发件人错误,并且期望“。” )和]之间进行验证)]
[FormControlEventHandler(formControlStr(ProdParmReportFinished, ProdParmReportFinished_EndJob), FormControlEventType::Validating)]
public static void ProdParmReportFinished_EndJob_OnValidating(FormControl sender, FormControlEventArgs e)
{
FormRun sender = Args.getThis();
sender.control(sender.controlId(formControlStr(ProdParmReportFinished, ProdParmReportFinished.EndJob))).allowEdit(false);
}
如果您正在使用扩展程序,请尝试类似的事情
[PostHandlerFor(formStr(YourForm), formMethodStr(YourForm, YourMethod))]
public static void YourForm_xxx(XppPrePostArgs args)
{
FormRun sender = Args.getThis();
sender.control(sender.controlId(formControlStr(YourForm, YourDatasource_Field))).allowEdit(false);
}
右键单击并选择复制事件处理程序方法,将正确的方法结构复制给您,然后输入代码