Ticket B199616
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

finish button

Disable Wizard Finish Button with code behind

created 14 years ago

Hallo,
i'm reading: http://www.devexpress.com/Support/Center/p/Q242160.aspx
-------------------------------------
Hello Alwin,
This is not a workaround, but a documented feature. This event is used to customize command buttons. As for the AllowNext property, the current behavior is correct. As described in the documentation, this property enables or disables the Next button. Since the Completion Page is removed, on the last page the Next button is replaced with the Finish button. The AllowNext property shouldn't modify the properties of the Finish button. If the Next button is restored, it will be enabled or disabled according to the AllowNext property.
Thanks,
Uriah.
------------------------------------
But i need to deactivate the finish button on code behind! How does it works?
With best regards,
Anastasius

Show previous comments (5)
DevExpress Support Team 13 years ago

    Hi,
    Alternatively, you can use this approach without any problem since WizardControl buttons are located within the WizardControl.Controls collection.

      Hopefully someone reads the end of this thread, before trying the code above. The proposed solution where you replace the finish button is problematic and a complete waste of time.

      Use Narsa's approach albeit with a type check, just in case the designer ordering changes. Probably unlikely but you never know. Ideally you would iterate the Control and look for the finish button.

      Snip of my wizard:

      C#
      if (wizardControl1.Controls[2].GetType() == typeof(DevExpress.XtraWizard.WizardButton)) wizardControl1.Controls[2].Enabled = true; } catch (Exception ed) { rtbQuery.Text = ed.Message; if (wizardControl1.Controls[2].GetType() == typeof(DevExpress.XtraWizard.WizardButton)) wizardControl1.Controls[2].Enabled = false; }

      The way this should have been done by DevExpress is that the WizardControl would have had an AllowFinish property.

      DevExpress Support Team 12 years ago

        Hi,
        We will take your opinion into account when we implement new features. Please add the Possibility to disable Finish button in XtraWizard thread to Favorite to be notified of our results.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.