The requested page is not available for the requested platform. You are viewing the content for Default platform.
All docs
V19.1
19.2 (EAP/Beta)
19.1
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

BaseWizard Class

A base class for classes that implement wizard functionality.

Declaration

class BaseWizard extends Utils.Disposable

constructor(pageFactory)

Creates a new instance of the BaseWizard class.

Declaration

constructor(pageFactory: PageFactory, finishCallback?: (model: IDataSourceWizardState) => JQueryPromise<boolean>)

Parameters

Name Type Description
pageFactory PageFactory

The page factory.

Optional Parameters

Name Type Default Description
finishCallback (model: IDataSourceWizardState) => JQueryPromise<boolean> null

The finish callback.

Properties

events Property

Provides access to the wizard's events collection.

Declaration

events: Utils.EventManager<BaseWizard, IWizardEvents<BaseWizard>>

Property Value

Type Description
EventManager<BaseWizard,IWizardEvents<BaseWizard>>

The event manager.

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

iterator: PageIterator

Property Value

Type Description
PageIterator

The page iterator.

Remarks

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

pageFactory Property

Specifies the page factory.

Declaration

pageFactory: 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

stateManager: 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

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

canNext(): boolean

Returns

Type Description
boolean

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

canRunWizard Method

Specifies whether the wizard can run.

Declaration

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

goToPage(pageId: string): void

Parameters

Name Type Description
pageId string

The page ID.

initialize Method

Initializes the wizard with the specified settings.

Declaration

initialize(state?: any, createIterator?: (pageFactory: PageFactory, stateManager: StateManager) => PageIterator): void

Optional Parameters

Name Type Default Description
state any null

The global state.

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

A function that creates a wizard iterator.

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

onFinish(): void

Remarks

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