C# 使用选定的事件行重命名acumatica中的网格

C# 使用选定的事件行重命名acumatica中的网格,c#,sql,asp.net,acumatica,C#,Sql,Asp.net,Acumatica,我尝试使用下面的代码重命名acumatica中的显示名称 PXUIFieldAttribute.SetDisplayName<BOMMaterial.qtys>(this.MaterialDetail.Cache, "test"); 如果我将代码放在事件之外,它确实可以工作,因此在加载屏幕时它会改变。但是,如果我将它放在rowselected事件中并使用验证,它不会更改显示名称。而且它不会显示任何错误。确保将PXGrid控件的RepaitColumns属性设置为True 尝试将th

我尝试使用下面的代码重命名acumatica中的显示名称

PXUIFieldAttribute.SetDisplayName<BOMMaterial.qtys>(this.MaterialDetail.Cache, "test");

如果我将代码放在事件之外,它确实可以工作,因此在加载屏幕时它会改变。但是,如果我将它放在rowselected事件中并使用验证,它不会更改显示名称。而且它不会显示任何错误。

确保将
PXGrid
控件的
RepaitColumns
属性设置为
True


尝试将
this.MaterialDetail.Cache
this.Caches[typeof(bommarterial)]
更改为传递给事件处理程序的
PXCache
对象
PXUIFieldAttribute.SetDisplayName(this.Caches[typeof(BOMMaterial)], typeof(BOMMaterial.qtys).Name , "test");