-
Select the control at C, and open the Events window.
-
On the Events window, type the value for Load as sp3DUOmCtrl11_Load. You can select this value from the drop-down list.
Check the name of the control, and type the values accordingly. In this case, the control at C is sp3DUOmCtrl1. Check the controls with your form, and type the values accordingly (sp3DUOmCtrlxxx).
-
On the Events window, type the value for ValidityProperty as sp3DUOmCtrl1_ValidateProperty, and press ENTER.
You are automatically directed to the Coding page.
-
On the Coding page, type the following: MessageBox.Show("Value acceptable");
-
For the control at D, type the following code:
try
{
UserControl oCntl = (UserControl)sender;
if (oCntl != null)
{
double odblVal =System.Convert.ToDouble(e.NewPropertyValue);
if (odblVal < 0.5)
{
MessageBox.Show("Value should be > 0.5");
e.SuccessfullyValidated = false;
}
else
{
e.SuccessfullyValidated = true;
}
}
}
catch (Exception)
{
e.SuccessfullyValidated = false;
}