Hi,
How to add an action to a grid without modifying the aspx?

Thanks,
EV
Hi,
How to add an action to a grid without modifying the aspx?

Thanks,
EV
Best answer by Leonardo Justiniano
Hi
There is not other way but to add a piece of aspx code to the page:
<px:PXGrid .....>
<ActionBar>
<CustomItems>
<px:PXToolBarButton Text="Grid Action" DependOnGrid="gridThings">
<AutoCallBack Target="ds" Command="GridAction">
<Behavior CommitChanges="True" ></Behavior>
</AutoCallBack>
</px:PXToolBarButton>
</CustomItems>
</ActionBar>
</px:PXGrid>This assumes you have an PXAction defined like:
public PXAction<MYThings> GridAction;
[PXUIField(DisplayName = Messages.Thing, Enabled = true)]
[PXButton(CommitChanges = true)]
protected virtual IEnumerable gridAction(PXAdapter adapter)
{
return adapter.Get();
}Hope this helps
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.