Acumatica:具有多个目标的 AutoCallback
Acumatica: AutoCallback with multiple target
我有3个格子,一个格子作为头部,一个作为细节,我想在格子第一次选择记录时刷新2个格子。我试过用AutoCallBack
,还是只能刷新1格,如何自动调用?
有几种方法可以做到这一点,但一个很好的例子是查看 Org -> Org Structure 下的 "Assignment and Approval Maps"。
在此屏幕中,当您单击 "Rules" 网格时,"Conditions" 网格会自动刷新。
这主要由两个项目控制
1) top/main 网格中的 AutoCallback 命令
2) lower/detail 网格中的参数。
例如,在引用的屏幕中有两个网格 "topGrid" 和 "bottomGrid"
topGrid 有以下内容
<AutoCallBack Target="tree" Command="Refresh" ActiveBehavior="True">
<Behavior RepaintControlsIDs="formRuleType,bottomGrid" ></Behavior>
</AutoCallBack>
这将刷新 bottomGrid,因为 topgrid 行是 selected/changed。 topGrid 定义中的 "KeepPosition" 和 "SyncPosition" 标志将强制 post 作为行 selected(保持 'Current' 作为当前 select编辑行。
现在在底部网格中有以下内容:
<Parameters>
<px:PXControlParam ControlID="topGrid" Name="routeID" PropertyName="DataValues["AssignmentRouteID"]" Type="Int32" ></px:PXControlParam>
</Parameters>
也就是说 "bottomGrid" 有一个名为 "routeID" 的参数,它从 topgrid 的 "AssignmentRouteID" 中提取它的值。
如果您查看 bottomGrid 的 BQL(主数据成员是 "Rules",您将看到以下定义:
protected virtual IEnumerable rules([PXDBInt] int? routeID)
{
定义使用定义的参数,将其传递到此处以用于select语句以return正确记录
使用此方法可以让您将详细信息网格刷新为头部网格 select 一行。同时,详细信息网格使用 headgrid 中的值作为其 select 语句的参数。
我有3个格子,一个格子作为头部,一个作为细节,我想在格子第一次选择记录时刷新2个格子。我试过用AutoCallBack
,还是只能刷新1格,如何自动调用?
有几种方法可以做到这一点,但一个很好的例子是查看 Org -> Org Structure 下的 "Assignment and Approval Maps"。
在此屏幕中,当您单击 "Rules" 网格时,"Conditions" 网格会自动刷新。
这主要由两个项目控制
1) top/main 网格中的 AutoCallback 命令 2) lower/detail 网格中的参数。
例如,在引用的屏幕中有两个网格 "topGrid" 和 "bottomGrid"
topGrid 有以下内容
<AutoCallBack Target="tree" Command="Refresh" ActiveBehavior="True">
<Behavior RepaintControlsIDs="formRuleType,bottomGrid" ></Behavior>
</AutoCallBack>
这将刷新 bottomGrid,因为 topgrid 行是 selected/changed。 topGrid 定义中的 "KeepPosition" 和 "SyncPosition" 标志将强制 post 作为行 selected(保持 'Current' 作为当前 select编辑行。
现在在底部网格中有以下内容:
<Parameters>
<px:PXControlParam ControlID="topGrid" Name="routeID" PropertyName="DataValues["AssignmentRouteID"]" Type="Int32" ></px:PXControlParam>
</Parameters>
也就是说 "bottomGrid" 有一个名为 "routeID" 的参数,它从 topgrid 的 "AssignmentRouteID" 中提取它的值。
如果您查看 bottomGrid 的 BQL(主数据成员是 "Rules",您将看到以下定义:
protected virtual IEnumerable rules([PXDBInt] int? routeID)
{
定义使用定义的参数,将其传递到此处以用于select语句以return正确记录
使用此方法可以让您将详细信息网格刷新为头部网格 select 一行。同时,详细信息网格使用 headgrid 中的值作为其 select 语句的参数。