要在Acumatica中添加列到现有网格,可以使用以下步骤:
以下是在Acumatica Customization Project Editor中添加列的代码示例:
using PX.Data;
using PX.Objects.CR;
namespace PX.Objects.CR
{
public class ContactMaint_Extension : PXGraphExtension
{
#region Event Handlers
protected void Contact_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
{
// Add new column to the grid
PXUIFieldAttribute.SetVisible(cache, null, true);
}
#endregion
}
}
上述示例中,我们在ContactMaint页面的Contact表格中添加了一个名为yourColumn的新列。请根据实际需要修改示例代码中的表格名称和列名称。