4

Is it possible to dynamically hide columns in a grid (using AEF). For example, based on certain conditions I want to hide certain columns in my graph dynamically.

I have used the RowSelectedEvent and have tried to use PXUIField Visibility functionality but it is not hiding the column. Is there a way to hide the columns from the Graph?

Joseph Caruana
  • 2,241
  • 3
  • 31
  • 48

1 Answers1

4

RowSelected should work. Check correctness of what you typed:

1. RowSelected should be protected.
2. Check that you pass into RowSelected PXCache and PXRowSelectedEventArgs
3. Check that in your SetVisible method you pass proper column
4. Check that you pass in method SetVisible proper view
5. Check that you didn't forget to passed not just view but Cache property of view
6. Check that you chosen correct DAC class. Sometime two different DAC classes can represent the same table ( for exapmple APRegister, APInvoice. Or POOrder, POOrder2 )

Here is sample from my working project:

protected void POOrder_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
{ 
   PXUIFieldAttribute.SetVisible<POOrderExt.allAmt>(this.VendorOrders.Cache, null, false);
   //this code hides column in my grid
}
Yuriy Zaletskyy
  • 4,983
  • 5
  • 34
  • 54