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
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
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.
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/.
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?
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).