Wizard fires events twice.

7 posts, 0 answers
  1. Luis
    Luis avatar
    2 posts
    Member since:
    Nov 2014

    Posted 11 Nov 2014 Link to this post

    I have a basic wizard setup with OnNextButtonClick and OnFinishButtonClick events inside a panel that updates itself with a RadAjaxManager, and when I click on the  NEXT/FINISH buttons the event in the serverside fires twice I tested this with a breakpoint at the start of the method, my markup looks like this


    <telerik:RadScriptManager ID="rasmMain" runat="server" />
        <telerik:RadAjaxManager ID="ramMain" runat="server" DefaultLoadingPanelID="rapMain">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="pTest">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pTest" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="rapMain" runat="server" />
     
        <telerik:RadAjaxPanel ID="rapResponseScripts" runat="server"></telerik:RadAjaxPanel>
     
        <asp:Panel ID="pTest" runat="server" ClientIDMode="Static">
            <telerik:RadWizard ID="rwNuevoCliente" runat="server" OnNextButtonClick="rwNuevoCliente_NextButtonClick" OnFinishButtonClick="rwNuevoCliente_FinishButtonClick">
                <WizardSteps>
                    <telerik:RadWizardStep Title="Informacion General" CausesValidation="true" ValidationGroup="Step1" ImageUrl="../../images/png/store12.png" >
                    </telerik:RadWizardStep>
                    <telerik:RadWizardStep Title="Detalles de Contacto" CausesValidation="true" ValidationGroup="Step2" ImageUrl="../../images/png/call46.png">
                    </telerik:RadWizardStep>
                    <telerik:RadWizardStep Title="Condiciones Comerciales" ImageUrl="../../images/png/commercial40.png">
                    </telerik:RadWizardStep>
                </WizardSteps>
            </telerik:RadWizard>
        </asp:Panel>


    In the code behind I just have an empty method declaration.
  2. Support
    Support avatar
    5 posts
    Member since:
    Feb 2007

    Posted 12 Nov 2014 Link to this post

    Hi,
     I am also facing the same issue. Could anyone please help?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 13 Nov 2014 Link to this post

    Hello,

    Most probably the reason for this behavior is subscribing for these events in the markup code and in the code behind ( if you use VB.NET) as well. If you subscribe for the events in code behind using the VB.NET syntax 
    //vb
    Protected Sub rwNuevoCliente_NextButtonClick(sender As Object, e As WizardEventArgs) Handles rwNuevoCliente.NextButtonClick
     
       End Sub

    please remove the highlighted line of code from the markup code
    //markup code
    <telerik:RadWizard ID="rwNuevoCliente" runat="server" OnNextButtonClick="rwNuevoCliente_NextButtonClick" OnFinishButtonClick="rwNuevoCliente_FinishButtonClick">
               <WizardSteps>
                   <telerik:RadWizardStep Title="Informacion General" CausesValidation="true" ValidationGroup="Step1" ImageUrl="../../images/png/store12.png" >
                   </telerik:RadWizardStep>
                   <telerik:RadWizardStep Title="Detalles de Contacto" CausesValidation="true" ValidationGroup="Step2" ImageUrl="../../images/png/call46.png">
                   </telerik:RadWizardStep>
                   <telerik:RadWizardStep Title="Condiciones Comerciales" ImageUrl="../../images/png/commercial40.png">
                   </telerik:RadWizardStep>
               </WizardSteps>
           </telerik:RadWizard>

    Same applies for the FinishButtonClick event.

    For reference I am attaching a sample project in C# where the events are fired only once as expected.

    Regards,
    Boyan Dimitrov
    Telerik
  5. Luis
    Luis avatar
    2 posts
    Member since:
    Nov 2014

    Posted 13 Nov 2014 in reply to Boyan Dimitrov Link to this post

    I noticed that in the example attached the wizard has its ClientIDMode Property set to "Static" after setting it in my page all the events fired just once   :)    I think its a weird behavior with the Dynamic ClientIDMode.

    Thanks a lot.
  6. Support
    Support avatar
    5 posts
    Member since:
    Feb 2007

    Posted 13 Nov 2014 Link to this post

    I have subscribed for the event just once,that in the markup.
    Setting the ClientIDMode to static solved the issue..
  7. John
    John avatar
    1 posts
    Member since:
    Dec 2011

    Posted 19 May 2015 Link to this post

    Setting the ClientIDMode to static solved this issue for me as well. The finish button click event was firing twice.
  8. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 20 May 2015 Link to this post

    Hello John,

    There was similar bug in RadWizard control that is already fixed so we are not aware of such issue now. Would you please share the exact code that will replicate the issue and elaborate which version of our controls are you using to replicate it.

    Regards,
    Plamen
    Telerik
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017