Onchange event for wizardstep

1 Answer 612 Views
Grid Stepper Wizard
Christopher
Top achievements
Rank 1
Iron
Christopher asked on 10 Sep 2021, 03:09 PM

Hello, is there a way to trigger the OnChange event within the wizard step only for the next action and not for the previous action. Currently I'm using the Wizard and wizard step to allow users to input data into a Telerik grid component. Since there is currently no validation for the grid I'm having to use my own validation which simple checks to see if there is at least 1 record in the grid before allowing the user to move on. However, since the OnChange event fires for both (next and previous) this makes the page not so user friendly. I would like to allow my validation to still work but only if the user wants to go to the next step in the Wizard but ignore my validation if they wish to go back. Below I have attached a code snippet of my OnChange parameter along with my validation.

1 Answer, 1 is accepted

Sort by
1
Accepted
Dimo
Telerik team
answered on 13 Sep 2021, 10:47 AM

Hi Christopher,

The OnChange event fires before the Wizard step has changed, so there is an easy way to check if the user has navigated backwards. In the OnChange event handler, compare args.TargetIndex to the current Wizard Value.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Christopher
Top achievements
Rank 1
Iron
commented on 13 Sep 2021, 01:21 PM

Thanks I was able to get it working using target Index.

 

Tags
Grid Stepper Wizard
Asked by
Christopher
Top achievements
Rank 1
Iron
Answers by
Dimo
Telerik team
Share this question
or