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

Wizard fires events twice.

6 Answers 157 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 11 Nov 2014, 03:43 PM
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.

6 Answers, 1 is accepted

Sort by
0
Support
Top achievements
Rank 1
answered on 12 Nov 2014, 06:13 PM
Hi,
 I am also facing the same issue. Could anyone please help?
0
Boyan Dimitrov
Telerik team
answered on 13 Nov 2014, 01:16 PM
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
0
Luis
Top achievements
Rank 1
answered on 13 Nov 2014, 03:17 PM
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.
0
Support
Top achievements
Rank 1
answered on 14 Nov 2014, 02:29 AM
I have subscribed for the event just once,that in the markup.
Setting the ClientIDMode to static solved the issue..
0
John
Top achievements
Rank 1
answered on 19 May 2015, 02:56 PM
Setting the ClientIDMode to static solved this issue for me as well. The finish button click event was firing twice.
0
Plamen
Telerik team
answered on 20 May 2015, 05:49 AM
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
Tags
Wizard
Asked by
Luis
Top achievements
Rank 1
Answers by
Support
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Luis
Top achievements
Rank 1
John
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or