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

Wizard Submission

9 Answers 791 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Amarnath
Top achievements
Rank 1
Amarnath asked on 21 Aug 2020, 03:58 AM

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.

9 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 25 Aug 2020, 11:19 AM

Hi Amarnath,

For an example of how to configure and submit a Form in the Wizard widget please refer to the following demo:

https://demos.telerik.com/aspnet-mvc/wizard

You will need to omit the Done() event handler implemented on the above in order to allow the Form to be automatically submitted upon Done button click:

    function onDone(e) {
        e.originalEvent.preventDefault();
        kendo.alert("Thank you for registering! Registration details will be sent to your email.");
    }

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
Amarnath
Top achievements
Rank 1
answered on 25 Aug 2020, 03:00 PM

Hi Veselin ,

Thanks for the reply.

But how can I map that wizard to a controller action method on click of DONE. i.e

1. I have mapped a model to a wizard

2. Then I filled the each steps and clicked on 'DONE'

How can we map this control to the controller action method

Can you please guide me where I can find the sample full solution with Wizard MVC control.

0
Veselin Tsvetanov
Telerik team
answered on 27 Aug 2020, 02:03 PM

Hello Amarnath,

You will need to configure the Wizard <form> element to use the appropriate attributes that would point to a controller endpoint:

@(Html.Kendo().Wizard()
    .Name("wizard")
    .HtmlAttributes(new { @novalidate ="", action = "controller/action", method = "post" })
    ...
)

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
Amarnath
Top achievements
Rank 1
answered on 28 Aug 2020, 10:30 AM

Hi Veselin ,

Thanks for your reply. 

I have applied as you have shown above. But, it didnt call the controller method.

can you please provide me a complete Wizard MVC solution pls. that will help me understand, how the flow is in the wizard.

0
Veselin Tsvetanov
Telerik team
answered on 02 Sep 2020, 06:33 AM

Hello Amarnath,

Attached you will find a small MVC sample, which implements the suggestions from my previous reply and submits the populated data in the Wizard to the Index POST action in the Home controller. Please, note that you will need to add the Kendo.Mvc.dll to your project and reference it in order to properly run the application.

Regards,
Veselin Tsvetanov
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
Amarnath
Top achievements
Rank 1
answered on 02 Sep 2020, 06:43 AM

Hi Veselin,

Attachment is missing. Can you please upload.

0
Veselin Tsvetanov
Telerik team
answered on 02 Sep 2020, 12:45 PM

Hi Amarnath,

I beg your pardon for missing the project from my previous reply. You will find it attached here.

Regards,
Veselin Tsvetanov
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
Amarnath
Top achievements
Rank 1
answered on 04 Sep 2020, 02:38 PM

Hi Veselin,

Thank You. It solved my issue. Thank you so much for the solution.

0
Marconi
Top achievements
Rank 1
Veteran
answered on 08 Nov 2020, 09:23 AM
Thanks! It works beautifully
Tags
Wizard
Asked by
Amarnath
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Amarnath
Top achievements
Rank 1
Marconi
Top achievements
Rank 1
Veteran
Share this question
or