Hey guys,
I want to check if the different radwizard steps are valid using their validation group.
The problem that I am having is since I have RenderedSteps="Active", the other steps are not being shown and I cannot use Page.Validate.
Example:
I have four Steps: Step0, Step1, Step2,Step3
I am currently in step0 and click on the navigation bar to go to Step3
public void radwizardControl_NavigationBarButtonClick(object sender, Telerik.Web.UI.WizardEventArgs e)
{
//We're only going to save information if the user is moving forward, not going back
if (e.CurrentStepIndex < e.NextStepIndex)
{
for (int iIterator = e.CurrentStepIndex + 1; iIterator < e.NextStepIndex; iIterator++)
{
Page.Validate(ListOfValidationGroups[iIterator]);
if (!Page.IsValid)
{
radwizardControl.ActiveStepIndex = iIterator;
break;
}
}
}
}
But as I said, the problem lies that when I try to validate a group that isn't rendered, Page.IsValid will always return true.
Is there any way around this?
I want to check if the different radwizard steps are valid using their validation group.
The problem that I am having is since I have RenderedSteps="Active", the other steps are not being shown and I cannot use Page.Validate.
Example:
I have four Steps: Step0, Step1, Step2,Step3
I am currently in step0 and click on the navigation bar to go to Step3
public void radwizardControl_NavigationBarButtonClick(object sender, Telerik.Web.UI.WizardEventArgs e)
{
//We're only going to save information if the user is moving forward, not going back
if (e.CurrentStepIndex < e.NextStepIndex)
{
for (int iIterator = e.CurrentStepIndex + 1; iIterator < e.NextStepIndex; iIterator++)
{
Page.Validate(ListOfValidationGroups[iIterator]);
if (!Page.IsValid)
{
radwizardControl.ActiveStepIndex = iIterator;
break;
}
}
}
}
But as I said, the problem lies that when I try to validate a group that isn't rendered, Page.IsValid will always return true.
Is there any way around this?