Skip to main content
Question

How to set visible or enabled in DialogWindow?

  • December 4, 2025
  • 2 replies
  • 13 views

Forum|alt.badge.img+1

I have two buttons that open the same dialog window. I need to set the visibility of the dialog fields depending on which button is clicked.

2 replies

Forum|alt.badge.img+7
  • Captain II
  • December 4, 2025

When you call Dialog.AskExt() you can indicate a method to call to initialize the dialog. So each PXAction button can initialize itself the way that you need.

WebDialogResult result = TheViewUsedToShowTheDialog.AskExt(InitializationMethod1, true);
if (result == WebDialogResult.OK)
{
...
}


private void InitializationMethod1(PXGraph graph, string name)
{
//set up your virtual DAC field visibility and field values here for the first configuration
}

private void InitializationMethod2(PXGraph graph, string name)
{
//set up your virtual DAC field visibility and field values here for the second configuration
}

 


darylbowman
Captain II
Forum|alt.badge.img+15

You should also be able to use a RowSelected event handler for the DAC which the dialog is bound in order to control the UI.