Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BaseWizard Class

A base class for classes that implement wizard functionality.

#Declaration

TypeScript
export class BaseWizard extends Disposable

#Inheritance

BaseWizard

#constructor(pageFactory)

Creates a new instance of the BaseWizard class.

#Declaration

TypeScript
constructor(
    pageFactory: DevExpress.Analytics.Wizard.PageFactory,
    finishCallback?: (model: DevExpress.Analytics.Wizard.IDataSourceWizardState) => JQueryPromise<boolean>
)

#Parameters

Name Type Description
pageFactory PageFactory

The page factory.

finishCallback (model: IDataSourceWizardState) => JQueryPromise<boolean>

The finish callback.

#Properties

#events Property

Provides access to the wizard’s events collection.

#Declaration

TypeScript
events: DevExpress.Analytics.Utils.EventManager<BaseWizard, IWizardEvents<BaseWizard>>

#Property Value

Type
EventManager<BaseWizard,IWizardEvents<BaseWizard>>

#Remarks

You can access the wizard’s events collection in the ASPxClientReportDesigner.CustomizeWizard event handler.

<script type="text/javascript">
    function beforeInit(args) {
       // ...
    }

    function CustomizeWizard(s, e) {
        if (e.Type === "ReportWizard") {
            e.Wizard.events.addHandler("beforeInitialize", beforeInit)
        }
    }
</script>

<dx:ASPxReportDesigner ID="ASPxReportDesigner1" runat="server">
    <ClientSideEvents CustomizeWizard="CustomizeWizard" />
</dx:ASPxReportDesigner>

The following table lists wizard events and describes how you can use them to customize the wizard.

Wizard Event

Description

beforeInitialize

Occurs before the FullscreenReportWizard.initialize/FullscreenDataSourceWizard.initialize method is called.

Handle this event to customize the predefined settings for the wizard’s global state. For instance, you can change the default page settings, the default report type, etc.

afterInitialize

Occurs after the FullscreenReportWizard.initialize/FullscreenDataSourceWizard.initialize method is called.

Handle this event to change the page count and/or sequence. For instance, you can remove a specific wizard page or register a new page.

beforePageInitialize

Occurs before the page’s initialize method is called.

Handle this event to customize the page’s content and state. For instance, you can remove a specific element from the start page or remove a specific section from other pages.

afterPageInitialize

Occurs after the page’s initialize method is called.

Handle this event to customize the page’s settings for display in the UI.

See the following topics for more information:

#iterator Property

Specifies the wizard’s page iterator.

#Declaration

TypeScript
iterator: DevExpress.Analytics.Wizard.PageIterator

#Property Value

Type
PageIterator<any>

#Remarks

You can use the page iterator to change the page sequence and/or number.

#pageFactory Property

Specifies the page factory.

#Declaration

TypeScript
pageFactory: DevExpress.Analytics.Wizard.PageFactory

#Property Value

Type Description
PageFactory

The page factory.

#Remarks

The page factory stores metadata for all wizard pages by their IDs. A metadata object implements the IFullscreenWizardPageMetadata interface.

You can use the page factory to remove a specific page from the wizard or add a new page to the wizard.

#stateManager Property

Specifies the state manager.

#Declaration

TypeScript
stateManager: DevExpress.Analytics.Wizard.StateManager

#Property Value

Type Description
StateManager

The state manager.

#Remarks

The State Manager object acts like a mediator between the global state and wizard pages. It processes the global state, extracts a local state for each page, and commits local changes to the global state.

#Methods

#canFinish Method

Specifies whether the Finish button is enabled.

#Declaration

TypeScript
canFinish(): boolean

#Returns

Type Description
boolean

true, if the Finish button is enabled; otherwise, false.

#canNext Method

Specifies whether the Next button is enabled.

#Declaration

TypeScript
canNext(): boolean

#Returns

Type Description
boolean

true, if the Next button is enabled; otherwise, false.

#canRunWizard Method

Specifies whether the wizard can run.

#Declaration

TypeScript
canRunWizard(): boolean

#Returns

Type Description
boolean

true, if the wizard can run; otherwise, false.

#Remarks

This property is in effect for the Data Source Wizard only. The property is set to true if users can create new data sources.

For the Report Wizard, this property always returns true.

#goToPage(pageId) Method

Navigates to the specified page.

#Declaration

TypeScript
goToPage(
    pageId: string
): void

#Parameters

Name Type Description
pageId string

The page ID.

#initialize Method

Initializes the wizard with the specified settings.

#Declaration

TypeScript
initialize(
    state?: any,
    createIterator?: (pageFactory: DevExpress.Analytics.Wizard.PageFactory,
    stateManager: DevExpress.Analytics.Wizard.StateManager) => DevExpress.Analytics.Wizard.PageIterator
): void

#Parameters

Name Type Description
state any

The global state.

createIterator (pageFactory: PageFactory, stateManager: StateManager) => PageIterator<any>

#Remarks

This method initializes the global state with the predefined settings and assigns the PageIterator object.

You can use the beforeInitialize and afterInitialize events to customize the wizard.

See the following topics for more information:

#onFinish Method

Completes the wizard and generates a report/data source based on the resulting global state.

#Declaration

TypeScript
onFinish(): void

#Remarks

You can use the beforeFinish and afterFinish events to customize the wizard result.