I try to inplement this : https://demos.telerik.com/aspnet-ajax/wizard/application-scenarios/add-remove-wizardsteps/defaultvb.aspx
This works fine in a test project. I am able to delete a step and every thing works fine.
But on my target project, after deleting a step: Step is deleted. all looks fine. But each time i click on "next" or on another step header i recieve error message.. In errormessage i see this has nothing to do with my code.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
|
I think it is the wizard. But it might be some othe stuff that is on the page.
I am not able to find what it is...
Any suggestion ?
I using a RadWizard in a page to update other elements. I have a cancel button each step and custom cancel button on the complete step. When attempting to reset the wizard back to the 1st step with client-side code. The wizard goes back to the 1st step. However, the step buttons no longer display, and validation messages remain. Due to the other elements on the page, it would be ideal to reset the wizard back to its original state without having to reload the page.
Any help with this is appreciated.
Cod Snippets below:
Markup:
<telerik:RadWizard ID="wzdNewTimeLine" runat="server" Width="100%" CssClass="Gridheigh4 controlfont" BorderStyle="Solid" BorderWidth="1px" OnClientLoad="wzOnClientLoad" OnClientButtonClicking="wzOnClientButtonClicking">
<WizardSteps>
<telerik:RadWizardStep ID="WizardStep1" runat="server" StepType="Start" Title="Product" CausesValidation="true" CssClass="controlfont" ValidationGroup="prod" DisplayCancelButton="true">
<div class="w3-bar-block">
<span class="w3-bar-item" style="width:50em">
<label><b>Product:</b></label><br />
<telerik:RadComboBox ID="dnProduct" runat="server" DataSourceID="dsProduct" DataTextField="Product" DataValueField="Product" EmptyMessage="Select a Product.." OnClientSelectedIndexChanged="dnProduct_OnIndexChange" Width="30%" CausesValidation="true" ValidationGroup="prod">
</telerik:RadComboBox>
<asp:RequiredFieldValidator ID="ProductRequiredFieldValidator" runat="server" ControlToValidate="dnProduct" ValidationGroup="prod" EnableClientScript="true" ForeColor="red"
ErrorMessage="*required field">
</asp:RequiredFieldValidator>
</span>
div class="w3-bar-item">
<h6 class="w3-flat-midnight-blue w3-round"><i class="fa-soild fa-info-circle"></i> Select a Product for this Timeline..</h6>
</div>
</div>
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="WzardStep2" runat="server" StepType="Step" Title="Review Type" CssClass="controlfont" ValidationGroup="reviewtype" CausesValidation="true" DisplayCancelButton="true">
<div class="w3-bar-block">
<span class="w3-bar-item" style="width:50em"><label><b>Review Type:</b></label><br />
<telerik:RadComboBox ID="dnReviewType" runat="server" DataSourceID="dsUMReviewType" DataTextField="Review_Type" DataValueField="Review_Type" OnClientSelectedIndexChanged="dnReviewType_OnIndexChange" EmptyMessage="Select a Review Type" Width="30%" ValidationGroup="reviewtype" CausesValidation="true">
</telerik:RadComboBox>
<asp:RequiredFieldValidator ID="ReviewTypeRequiredFieldValidator" runat="server" ControlToValidate="dnReviewType" EnableClientScript="true" ValidationGroup="reviewtype" ErrorMessage="*required feild" ForeColor="Red"></asp:RequiredFieldValidator>
</span>
</div>
<div class="w3-bar-item">
<h6 class="w3-flat-midnight-blue w3-round"><i class="fa-solid fa-info-circle"></i> Select the Review Type for this Timeline..</h6>
</div>
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="WizrdStep3" runat="server" StepType="Step" Title="Urgency" CssClass="controlfont" ValidationGroup="urgencycode" CauseValidation="true" DisplayCancelButton="true">
<div class="w3-bar-block">
<span class="w3-bar-item" style="width:50em">
<label><b>Urgency Code:</b></label><br /><telerik:RadComboBox ID="dnUrgencyCode" runat="server" DataSourceID="dsUgencyCode" DataTextField="Urgency_Code" DataValueField="Urgency_Code" EmptyMessage="Select an Urgency Code" OnClientSelectedIndexChanged="dnUrgencyCode_OnIndexChange" Width="30%"></telerik:RadComboBox>
<asp:RequiredFieldValidator ID="UrgencyCodeRequiredFieldValidator" runat="server" ControlToValidate="dnUrgencyCode" ValidationGroup="urgencycode" EnableClientScript="true" ErrorMessage="*required field" ForeColor="Red"></asp:RequiredFieldValidator>
</span>
<div class="w3-bar-item">
<h6 class="w3-flat-midnight-blue w3-round"><i class="fa-solid fa-info-circle"></i> Select an Urgency Code for this Timeline..</h6>
</div>
</div>
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="WizardStep4" runat="server" StepType="Finish" Title="Deadline Days" CausesValidation="true" ValidationGroup="nodays" DisplayCancelButton="true">
<table style="width:100%">
<tr>
<td style="text-align:right"><b>Days to Deadline:</b></td>
<td style="text-align:left">
<telerik:RadNumericTextBox ID="txtDeadline" runat="server" ToolTip="Number of days to Decision Deadline." Value="0" Width="30%"
NumberFormat-DecimalDigits="0" CausesValidation="true" ValidationGroup="nodays">
</telerik:RadNumericTextBox>
<asp:CustomValidator ID="DeadlineCustomValidator" runat="server" ControlToValidate="txtDeadline" EnableClientScript="true" ValidationGroup="nodays" ForeColor="Red" ErrorMessage="*value must be greater than zero" ClientValidationFunction="ValidateDeadlineDays"></asp:CustomValidator>
</td>
</tr>
<tr>
<td style="text-align:right"><b>Extension Days:</b></td>
<td style="text-align:left">
<telerik:RadNumericTextBox ID="txtExtension" runat="server" ToolTip="Number of days added to deadline form the 'Extension Sent' Value.." Value="0" Width="30%" NumberFormat-DecimalDigits="0" CausesValidation="true" ValidationGroup="nodays"></telerik:RadNumericTextBox>
<asp:CustomValidator ID="ExtensionCustomValidator" runat="server" ControlToValidate="txtExtension" EnableClientScript="true"
ValidationGroup="nodays" ForeColor="red" ErrorMessage="*extensions not valid for Post-Service or Urgent UM" ClientValidationFunction="ValidateExt"></asp:CustomValidator>
</td>
</tr>
<tr>
<td style="text-align:right; vertical-align:middle">
<telerik:RadSwitch ID="ckMMSOnly" runat="server" AutoPostBack="false" CssClass="elasticSwitch" OnClientCheckedChanged="ckMMS_OnChange"></telerik:RadSwitch>
</td>
<td style="text-align:left;padding-left:5px"><b>:Medication Management Only?</b></td>
</tr>
</table>
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="WizardStepComplete" runat="server" StepType="Complete" DisplayCancelButton="true" AllowReturn="true">
<p>Save your changes..</p>
<br />
<br />
<div class="w3-bar">
<div class="w3-bar-item">
<!---- Custom Cancel Button -->
<button class="w3-btn w3-flat-midnight-blue w3-small w3-round"
onclick="btnCancel_OnClick(); return false"><i class="fa-solid fa-cancel"></i> Cancel Changes</button>
</div>
<div class="w3-bar-item">
<button id="btnAdd" class="w3-btn w3-flat-midnight-blue w3-round" onclick="btnAdd_Onclick(); return false"><i class="fa-solid fa-save"></i> Save</button>
</div>
</div>
</telerik:RadWizardStep>
</WizardSteps>
</telerik:RadWizard>
Client-Side Code
<script type="text/javascript">
function wzOnClientLoad(sender, args) {
for (var i = 1; i < sender.get_wizardSteps().get_count() ; i++) {
sender.get_wizardSteps().getWizardStep(i).set_enabled(false);
}
}
function wzOnClientButtonClicking(sender, args) {
var command = args.get_command();
if (command == 3) {
args.set_cancel(true);
btnCancel_OnClick();
//return;
}
if (!args.get_nextActiveStep().get_enabled()) {
args.get_nextActiveStep().set_enabled(true);
}
}
function ValidateDeadlineDays(s, e) {
var wiz = $find("<%=wzdNewTimeLine.ClientID%>");
if (e.Value < 1) {
e.IsValid = false;
}
else {
e.IsValid = true;
document.getElementById("<%=hdnDealineDays.ClientID%>").value = e.Value;
}
}
function ValidateExt(s, e) {
var reviewtype = document.getElementById("<%=hdnReviewType.ClientID%>").value;
var urgencycode = document.getElementById("<%=dnUrgencyCode.ClientID%>").value;
if (e.Value > 0) {
if (reviewtype == "Post-Service" || urgencycode == "Urgent" || urgencycode == "Non-Urgent to Urgent") {
e.IsValid = false;
}
}
else {
e.IsValid = true;
document.getElementById("<%=hdnExtDays.ClientID%>").value = e.Value;
}
}
function ckMMS_OnChange(s, e) {
document.getElementById("<%=hdnMMS.ClientID%>").value = e._checked;
}
function btnAdd_Onclick() {
__doPostBack("<%=pnlTimelines.ClientID%>");
btnCancel_OnClick();
}
function btnNewTL_OnClick() {
var wizcontainer = document.getElementById('newtl');
wizcontainer.style.display = 'block';
var wizard = $find("<%=wzdNewTimeLine.ClientID%>");
wzOnClientLoad(wizard, "");
}
function dnProduct_OnIndexChange(s, e) {
var prod = s.get_value();
if (prod.length > 0) {
document.getElementById("<%=hdnProduct.ClientID%>").value = prod;
}
}
//** Clear out wizard control values and rest to start **
function btnCancel_OnClick() {
$find("<%=dnProduct.ClientID%>").clearSelection();
$find("<%=dnReviewType.ClientID%>").clearSelection();
$find("<%=dnUrgencyCode.ClientID%>").clearSelection();
$find("<%=txtDeadline.ClientID%>").set_value(0);
$find("<%=txtExtension.ClientID%>").set_value(0);
$find("<%=ckMMSOnly.ClientID%>").set_checked(false);
var wizard = $find("<%=wzdNewTimeLine.ClientID%>");
var wizardsteps = wizard.get_wizardSteps();
wizardsteps._data[0].set_active(true);
wizard.set_progressPercent(0);
document.getElementById("<%=hdnProduct.ClientID%>").value = "";
document.getElementById("<%=hdnReviewType.ClientID%>").value = "";
document.getElementById("<%=hdnUrgencyCode.ClientID%>").value = "";
document.getElementById("<%=hdnDealineDays.ClientID%>").value = 0;
document.getElementById("<%=hdnExtDays.ClientID%>").value = 0;
document.getElementById("<%=hdnMMS.ClientID%>").value = false;
document.getElementById('newtl').style.display = 'none';
}
</script>
Unable to get the validation of the controls working in Web form
RadWizard and previous button in UI for ASP.NET AJAX | Telerik Forums
When I try to run an upgrade on my ASP.NET AJAX project in Visual Studio 2013, the only version showing up is the current version that the project is already using "2021.3.914.45" I'm trying to upgrade to UI for ASP.NET AJAX R1 2022 SP1 (version 2022.1.302). How do I get the newer versions to show up as a selection to upgrade to?
Hi
We are struggling to get validation in place on RadWizard. Tried all options mentioned in the docs and previous support queries. Sample code below where no validation is fired. Could you please let me know what we are missing.
Note: to meet our requirements, content of each step will be a separate user control, on the aspx page, a step will be added at runtime with user control suited to business requirement added on the step. Each step will include multiple elements which will be required to be validated for data and format with minimal javascript.
Many Thanks
<
telerik:RadWizard
runat
=
"server"
ID
=
"RadWizard2"
RenderedSteps
=
"All"
>
<
WizardSteps
>
<
telerik:RadWizardStep
ID
=
"RadWizardStep3"
ValidationGroup
=
"Group1"
>
<
asp:TextBox
runat
=
"server"
ID
=
"TextBox1"
ValidationGroup
=
"Group1"
/>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator2"
runat
=
"server"
ErrorMessage
=
"ADD TEXT"
ControlToValidate
=
"TextBox1"
ValidationGroup
=
"Group1"
>
</
asp:RequiredFieldValidator
>
</
telerik:RadWizardStep
>
<
telerik:RadWizardStep
ID
=
"RadWizardStep1"
ValidationGroup
=
"Group2"
>
<
asp:TextBox
runat
=
"server"
ID
=
"TextBox2"
ValidationGroup
=
"Group2"
/>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator1"
runat
=
"server"
ErrorMessage
=
"ADD TEXT"
ControlToValidate
=
"TextBox2"
ValidationGroup
=
"Group2"
>
</
asp:RequiredFieldValidator
>
</
telerik:RadWizardStep
>
<
telerik:RadWizardStep
ID
=
"RadWizardStep2"
ValidationGroup
=
"Group3"
>
<
asp:TextBox
runat
=
"server"
ID
=
"TextBox3"
ValidationGroup
=
"Group3"
/>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator3"
runat
=
"server"
ErrorMessage
=
"ADD TEXT"
ControlToValidate
=
"TextBox3"
ValidationGroup
=
"Group3"
>
</
asp:RequiredFieldValidator
>
</
telerik:RadWizardStep
>
</
WizardSteps
>
</
telerik:RadWizard
>
Ok, so I am working on a project where inside a RadWizard control I am adding dynamically creating RadDropDownList controls.
RadDropDownList ddl = new RadDropDownList() { ID = string.Format("FrmDDL{0}", i) };
I then call a method to select the selected RadDropDownListItem (Now using every method I can think of to select the value) (The RadDropDownList is passed to the method as 'r')
foreach (DropDownListItem l in r.Items)
{
if (string.Compare(value, l.Value) == 0)
{
l.Selected = true;
r.SelectedIndex = i;
r.SelectedValue = l.Value;
r.SelectedText = l.Text;
}
i++;
}
Now where it gets interesting is when you look at the generated code
<div id="FrmDDL0" class="RadDropDownList" style="width:300px;" tabindex="0">
<span class="rddlInner">
<span class="rddlFakeInput">X4</span>
<span class="rddlIcon"><!-- --></span>
</span>
<div class="rddlSlide" id="FrmDDL0_DropDown" style="display:none;">
<div class="rddlPopup rddlPopup_SI">
<ul class="rddlList">
<li class="rddlItem"> </li>
<li class="rddlItem">X1</li>
<li class="rddlItem">X2</li>
<li class="rddlItem">X3</li>
<li class="rddlItem rddlItemSelected">X4</li>
</ul>
</div>
</div>
<input id="FrmDDL0_ClientState" name="FrmDDL0_ClientState" type="hidden" autocomplete="off">
</div>
You can clearly see that the _ClientState control is not populated with the selected value even though the <li> item has the 'rddlItemSelected' class. For comparison this is what it looks like if I selected a value from the RadDropDownList from the UI.
<input id="FrmDDL0_ClientState" name="FrmDDL0_ClientState" type="hidden" autocomplete="off" value="{"enabled":true,"logEntries":[],"selectedIndex":4,"selectedText":"X4","selectedValue":"X4"}">
So the question really becomes, when using the RadWizard and its back and forward buttons, how do I persist client selection on a dynamically created RadDropDownList
Hi,
I have a radWizard and an ajaxloadingpanel (connected by a radajaxmanager)
However when I change steps the loading panel does not work,
The first step I am using the radwizard "next" button and on the second step y button is custom.On neither of the button clicks does the loading panel show.
Thanks
Very simple but cant find a way to do it:
I have a rad wizard and want custon text in the "Next" button in the second step....
Hi,
My wizard has 7 steps but after step 2, all other steps are optional. Rather than having the user click Next 6 more times, I'd like to show the Finish button on Step2. How do I go about this and How do you go about making tabs for optional steps (clickable) but not for the first 2 steps? The closest thread I found is this:
https://www.telerik.com/forums/display-next-previous-and-finish-button-in-all-radwizard-steps#SprpJ3GYo0Oy1IJxI8e_nw
but does not quite answer the question above.