Add Button To Grid In Acumatica
17 July 2014
Hello everybody,
today I want briefly share how to add button to Grid in Acumatica. Actually button without any dialogs. Just button with posibility to run C# code.
Lets say you have grid, and want name for button Calculate.
Then in graph you should write something like this:
public PXAction<PRPayroll> Calculate; [PXButton] [PXUIField(DisplayName = "Calculate")] public virtual IEnumerable calculate(PXAdapter adapter) { return adapter.Get(); }
And in grid something like this:
<ActionBar ActionsText="True"> <CustomItems> <px:PXToolBarButton> <AutoCallBack Command="Calculate" Target="ds" > </AutoCallBack> </px:PXToolBarButton> </CustomItems> </ActionBar> </px:PXGrid>
And you'll get in your grid nice button Calculate. Enjoy