Skip to main content

Hide Columns from Grid on the Fly

  • September 27, 2022
  • 0 replies
  • 639 views

deybanperez83
Jr Varsity III

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
 

Event Handler Definition Example
  1. You must add the CommitChanges propperty to the fied triggering the condition. In our case, the Use Quota field
  2. I´m sharing the grid propperties, nothing special at all
    Grid Definition

    Result
    -Before
     



    -After
     

     

Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings