Validate a Page
Mon 27 Jan 2020 - 17:32
Hi,
Is there any way to validate a wizard page at a time i.e. when next page button is clicked validate the current page before proceeding?
Thanks,Gareth
________________________________________________________________________________________________________________________________
Add this Code to the PageChanging Event
Hope this helps
______________________________________________________________________________________________________________
That is great, thanks very much.
Gareth
Is there any way to validate a wizard page at a time i.e. when next page button is clicked validate the current page before proceeding?
Thanks,Gareth
________________________________________________________________________________________________________________________________
Add this Code to the PageChanging Event
- Code:
if (e.Direction == EnquiryPageDirection.Next)
{
foreach (Control ctrl in this.EnquiryForm.Controls)
{
if (ctrl.Visible)
{
System.Data.DataRow dr = EnquiryForm.GetSettings(ctrl.Name);
if (dr != null && Convert.ToBoolean(dr["quRequired"]))
{
if (Convert.ToString(EnquiryForm.GetIBasicEnquiryControl2(
ctrl.Name,EnquiryControlMissing.Exception).Value) == "")
{
EnquiryForm.ShowMissingField(ctrl,"Required field");
e.Cancel = true; return;
}
}
}
}
}
Hope this helps
______________________________________________________________________________________________________________
That is great, thanks very much.
Gareth
Permissions in this forum:
You cannot reply to topics in this forum
|
|