Question

To get the Confirmation from user, I am using the Confirmation Message Box i.e Ext.net MessageBox to Confirm the Decision of the User using the ButtonConfig, as like below.

private void checkThePolicies()
{
  .......

  foreach (int policyId in PoliciesDeleted)
                {
                    X.Msg.Confirm( "User Policy", "Do you want to Delete the Policy", new MessageBoxButtonsConfig
                    {
                        Yes = new MessageBoxButtonConfig
                        {

                            Handler = "#{DirectMethods}.fnSaveTimeOffTypeInAllowance()",
                            Text = "Yes"
                        },
                        No = new MessageBoxButtonConfig
                        {
                            Text = "No"
                        }
                    }).Show();

........
}

But this message box is showing Only once for Entire loop at last when it's execution is leaving form that Method.

Why this happens? I want to execute the Handler for every Loop by confirming the Decision.

Was it helpful?

Solution

X.Msg.Confifm().Show();

just generates JavaScript to be executed when a browser gets a response from server.

It doesn't send a request to a browser immediately.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top