This is a migrated thread and some comments may be shown as answers.

ActiveWizardStep Move On Update

1 Answer 45 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
haseeb
Top achievements
Rank 1
haseeb asked on 29 Apr 2019, 10:35 AM

Hello Every one

This is my first post, In my Applictaion when i clicked on the Add button it will open a radwindow (New form), When i click on the save button it saves the record and back to the original Wizard Step, I would like to implement a logic in which when user clicked on save button it back to the original Wizard but skip that step and move to the next step Automatically, so user dont need to press the Next button,

Can any one please guide?

 

 //**// for NewForm Start
            function AddOrUpdateNewForm() {
                var eventID = document.getElementById('<%= EventID.ClientID %>').value;          
                var oWnd = window.radopen("NewForm.aspx?IsAmend=true&EventID=" + eventID, "BtnNewForm");
                oWnd.SetUrl(oWnd.GetUrl());
            }
            function OnNewFormClose(radWindow) {
                var arg = radWindow.Argument;
                if (!radWindow.Argument) {
                }
                else {
                    SelectSpecificDisableComboValue($find("<%=ABC.ClientID %>"), arg.ABC);
                  
                    SetValue(arg.BRSTotalScore, $find("<%=Total.ClientID %>"));                
                    MoveNextStep();                   
                }
            }
            //**// for NewForm End

I would like to implement the logic when user is on ABC Step and open the DEF form through ABC Step (RadWindow) and when saved the record through Radwindow then user is redirected to the XYZ (Next Step), rather than coming back to ABC Step.

 function MoveNextStep(sender, args) {
                alert("MoveStep1");
                var step = document.getElementById('<%=ActiveWizardStep.ClientID%>').innerText;
                //alert(step1);              
                alert(step);      

                var command = args.get_command();
                if (command == "1") {
                    var activeIndex = sender.get_activeIndex();
                    if (activeIndex > 0) {
                        sender.set_activeIndex(activeIndex + 1)
                    }
                }            

            }

 

 

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 02 May 2019, 07:08 AM
Hi Haseeb,

You can programmatically switch the RadWizard step using one of the below methods:

var wizard = $find("<%= RadWizard1.ClientID %>");
wizard.set_activeIndex(1);
or 
wizard.get_wizardSteps().getWizardStep(0).set_active();
or 
wizard.get_nextButtonElement().click();

You can find more detail in the documentation Client-side Programming Overview and Wizard Object.

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Wizard
Asked by
haseeb
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or