Hi everyone,
I want to share with you how my team has conditionally hide a Grid Column in an Acumatica Grid.
Firstable, the context is that we wanted to hide the Quota % column of a grid when the Use Quota Flag of the header was set to No.
To do so:
1) Code in the RowSelected of the Grid (Not the parent) the field property SetVisible:
PXUIFieldAttriute.SetVisible<DAC.Field>(cache, null, Conditional_Expression);
2) Traditionally the Acumatica Event_Handlers are coded by adding
if(e.Row == null)
return;
You must put the code block from 1) before 2) as it is depicted in the following image
- You must add the CommitChanges propperty to the fied triggering the condition. In our case, the Use Quota field
- I´m sharing the grid propperties, nothing special at all
Result
-Before
-After