Hi,
How to add an action to a grid without modifying the aspx?
Thanks,
EV
Best answer by Leonardo Justiniano
View originalHi,
How to add an action to a grid without modifying the aspx?
Thanks,
EV
Best answer by Leonardo Justiniano
View originalYou can add the action using the screen editor and thus avoid touching the .aspx file directly.
What have you done so far?
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
Hi,
Ok thanks. What happens if someone need to add a new action to a page in another customization project?
Thanks,
EV
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.