我有一个页眉/详细信息自定义屏幕,在该屏幕上,根据页眉中的下拉菜单选择要显示的网格列。这可以正常工作,但现在我也想更改一些列名称。使用记录的语法,我无法使它正常工作。我看不到自己在做什么错-似乎没有什么不同。我已附加到流程中,并在此事件中设置了一个断点,并且达到了终点,但是系统似乎只是忽略了它:
I have a Header / Detail custom screen where I'm manipulating which grid columns display based on a dropdown selection in the header. This works fine, but now I'd like to change a few column names as well. Using the documented syntax, I cannot get this to work. I can't see what I'm doing wrong - nothing seems to make any difference. I've attached to process and put a break point at this event, and it's hitting the line - but the system seems to just ignore it:
protected virtual void ACMappingHeader_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { var mh = (ACMappingHeader)e.Row; if (mh == null) return; if (mh.MappingType == "Option1") { PXUIFieldAttribute.SetDisplayName<ACMappingDetail.target1CD>(this.MappingDetail.Cache, "Target");谢谢...
推荐答案您的显示名称例程看起来正确,但是要确保实际更新列名称,您需要执行以下操作:
Your display name routine looks correct however to make sure the column names actually update you need to do the following:
- 在页面源中,需要在网格上设置 RepaintColumns = true值。可以通过自定义管理器或直接从ASPX源完成。 -告诉网格在回调后刷新列,允许标题实际重新显示。
更多推荐
动态更改列名
发布评论