Skip to main content

Good morning, Fellow Developers!

I have a custom screen that uses the same object for address sections of my screen.  Note graph below:

 

Note that the views Billing_Address and Transfer_Address use the same ACM DAC object ‘Address’.  When using the RowSelected event, it does in fact set the visibility; however, it affects BOTH Billing_Address and Transfer_Address.  Is there a way to only set the visibility for the specific view?  I only want to hide the Transfer_Address view, but the above code is not working.  Any thoughts from the gurus?  Thank you in advance for any assistance!

@kwillman15 

have you tried PXHidden] before the view you want to hide?


@aaghaei Thank you for your reply!  The problem is that I want to dynamically show/hide the controls during the RowSelected event handler.  When I use the code above, it removes both fields from the screen.  Billing_Address and Transfer_Address.  I ALWAYS need to see on the screen the Billing_Address, but conditionally hide the Transfer_Address fields from the screen.  Depending on master document value.  Does that make sense?  Thank you! 


@kwillman15 

in your code try YourView.AllowSelect = true/false to show/hide the view dynamically


Thanks, again!  I tried that, and the controls remained visible on the screen.  I attempted using:

 

protected void xnxBOLHeader_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
        {
            xnxBOLHeader row = (xnxBOLHeader)e.Row;

            if (row != null)
            {
                if (row.SOOrderNbr == null)
                {
                         Transfer_Address.AllowSelect = false;              
                }

            }
        }

 

Nothing seemed to change on the screen.  Everything remains visible.  I am not sure why?  Thank you!


Reply