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

Changing the Step

6 Answers 342 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Headygains
Top achievements
Rank 1
Veteran
Headygains asked on 17 Jul 2020, 05:25 PM
 function poWizardReset(e) {
    if(e.sender.currentStep.options.index === 0) {
        $initPo.val('');
        $initPart.val('');
        $initLineItem.value('');
        $initAckId.value(0);
    }
 
    if (e.sender.currentStep.options.index === 1) {
        $initVerifyPo.val('');
        $initVerifyStockRoom.val('');
        $initVerifySupCode.val('');
        $initVerifySupName.val('');
        $initVerifyLineItem.val('');
        $initVerifyPart.val('');
        $initVerifyUoM.val('');
        $initVerifyAllowed.value(0);
    }
 
    if (e.sender.currentStep.options.index === 2) {
        $finalPart.val('');
        $finalPo.val('');
        $finalLineItem.val('');
        $finalAllowed.value(0);
        $finalPrinterId.value(0);
 
        $finalPackingSlip.val('');
        $finalQuantity.value(0);
        $finalCarrierTracking.val('');
        $finalCarrierId.value(0);
        $finalMulti.checked(false);
    }
 
    if (e.sender.currentStep.options.index === 3) {
    }
}

 

On the reset button click and the corresponding event, how would I navigate between the steps?

 

 

 

 

6 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 22 Jul 2020, 03:56 PM

Hello,

Assuming "poWizardReset" is the handler of the Wizard's reset event, you can navigate through the steps by calling the Wizard's select method and passing the step index as a parameter, e.g.,

//navigate to the second step:
e.sender.select(1);

Regards,
Ivan Danchev
Progress Telerik

0
Amarnath
Top achievements
Rank 1
answered on 21 Aug 2020, 04:37 AM

Hi Ivan,

How can I submit the wizard's model to the Controller.i.e. on Done(), how can submit the binded model to the controller?
please hep. I am new and stuck on this.

0
Veselin Tsvetanov
Telerik team
answered on 25 Aug 2020, 11:23 AM

Hello Amarnath,

I have just answered in the forum topic that you have opened on your particular question. In case you have any other questions on that matter, please, write those in the other thread.

Regards,
Veselin Tsvetanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Headygains
Top achievements
Rank 1
Veteran
answered on 30 Sep 2020, 10:55 PM

It seems that there are conditions where $("#wizard").select(index); won't fire. Specifically I run into this issue I'm moving forward into the next step in progression but I've evaluated that the user hasn't met my criteria for continuing. 

 

The example code that doesn't fire: 

01.if (e.step.options.index === 5) {
02.    console.log("Step 6");
03.    updateAllotted();
04.    let back = false;
05.    if(repackageRequired && !splitValid()) {
06.        back = true;
07.        toastr.warning("The received qty must be fully distributed before finalizing.", "Warning", { positionClass: "toast-bottom-right", containerId: "toast-bottom-right" });
08.    } else {
09.        // *** Finalize ***
10.        splitPassed = true;
11.        populateStep6();
12.    }
13. 
14.    if(back) {
15.        console.log("Return to step 5.");
16.        console.log($wizardPo);
17.        $wizardPo.select(3);
18.    }
19.}

 

When I debug the select call it just doesn't fire, I get no errors in console, I do receive the console.log() outputs as if it should fire correctly. Is there a reason this is happening?

0
Ivan Danchev
Telerik team
answered on 05 Oct 2020, 10:59 AM

Hi,

The "select" event of the Wizard does not fire when a step is selected programmatically (through calling the select method). It fires on user interaction. So if you want the event to fire when the selection is changed programmatically, you will have to trigger the event:

 

$wizardPo.select(3);
$wizardPo.trigger("select", { step: $wizardPo.steps()[3] });

 

Note that the selected step is passed to the method, so that it is accessible in the "select" event handler (through e.step).

Regards,
Ivan Danchev
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Headygains
Top achievements
Rank 1
Veteran
answered on 07 Oct 2020, 02:31 PM
You are the goat
Tags
Wizard
Asked by
Headygains
Top achievements
Rank 1
Veteran
Answers by
Ivan Danchev
Telerik team
Amarnath
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Headygains
Top achievements
Rank 1
Veteran
Share this question
or