How to control navigation in RadWizard

3 posts, 1 answers
  1. Thys
    Thys avatar
    17 posts
    Member since:
    Mar 2014

    Posted 20 Apr 2015 Link to this post

    The new RadWizard control has the potential to be very useful. We use a lot of wizards in our application. These are all "manually" implemented currently. I had a look at the new RadWizard control and it has the potential to simplify this quite a lot.

     Currently the documentation is a bit lacking (I know it is in beta). However, some questions:

    1) How can I modify the default navigation?

    I tried linking to the "next" event on the wizard, and then, based on some parameters setting the SelectedpageIndex. This works well for most cases. However, how do I cancel any navigation after the "next" button has been clicked? As an example in some transitions we do some validation,which fails. An error message is displayed, but there does not seem to be an obvious way to stay on the current page. If I leave the selectedpageindex to the current page it still navigates to the next one regardless.

    2) Is there any way to have a tag of some sort linked to the individual pages?

    In the code with custom navigation there is a lot of reference to "if pageindex =x then do this etc.", but the value of the page index depends on the sequence in which the pages are added in the xaml. I would like to be able to assign some id in the xaml so that if we refer to a specific page in the code we always know it is the same page, regardless of the sequence in which is was added.


  2. Answer
    Yoan avatar
    1051 posts

    Posted 21 Apr 2015 Link to this post


    I would suggest you to use the SelectionChanging event since you can cancel it based on some condition. In this way you will cancel the navigation  to other page. As for you other question - you can give a name of your WizardPages:
    <telerik:RadWizard x:Name="myWizard" SelectionChanging="myWizard_SelectionChanging">
                    <telerik:WizardPage Header="0" x:Name="page0"/>
                    <telerik:WizardPage Header="1"  x:Name="page1"/>

    Then in the SelectionChanging event you can check the name of the new page (args.NewPage):
    private void myWizard_SelectionChanging(object sender, SelectedPageChangingEventArgs e)
            if (e.NewPage.Name == "page1")
                e.Cancel = true;   

    I hope this information helps.


    See What's Next in App Development. Register for TelerikNEXT.

  3. DevCraft R3 2016 release webinar banner
  4. Thys
    Thys avatar
    17 posts
    Member since:
    Mar 2014

    Posted 23 Apr 2015 in reply to Yoan Link to this post

    This solved the problem, thanks.
Back to Top