Enable Disable Button Of Grid Or Pxtoolbarbutton Which Depends From Value Of Column In Acumatica

Enable disable button of grid or PXToolBarButton, which depends from value of column in Acumatica

Hello everybody.

My next notice is about following case. 

Suppose you have from PR301000, which has grid with id "grid" with button calculate. Also grid has column, which is bounded to column caculated, and you need the following:

If in selected row field "Calculated" is true, then disable button Calculate. If in selected row field "Calculated" is unchecked, then enable button calculate. 

In order to implement this following should be implemented:

1. In grid at page pr301000:

        <ActionBar ActionsText="True">


                <px:PXToolBarButton Text="Calculate" DependOnGrid="grid" StateColumn="Calculated">

   <AutoCallBack Command="Calculate" Target="ds" >





2. In ds section write the following:

<px:PXDataSource ID="ds" runat="server" Visible="True" Width="100%" PrimaryView="PayRolls" SuspendUnloading="False" TypeName="DS.PayRollManager">


            <px:PXDSCallbackCommand Name="Calculate" Visible="False" DependOnGrid="grid">




3. Declaration in dac class should be the following:

#region Calculated

public abstract class calculated : PX.Data.IBqlField



protected bool? _Calculated;


[PXDefault(false, PersistingCheck = PXPersistingCheck.Nothing)]

[PXUIField(DisplayName = "Calculated")]

public virtual bool? Calculated




return this._Calculated;




this._Calculated = value;




after I implemented those changes button calculated taken into account field Calculated

No Comments

Add a Comment
Comments are closed