BaseWizard Class
A base class for classes that implement wizard functionality.
Declaration
export class BaseWizard extends Disposable
Inheritance
constructor(pageFactory)
Creates a new instance of the BaseWizard
class.
Declaration
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
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 |
---|---|
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. | |
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. | |
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. | |
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:
- Customize the Report/Data Source Wizard (ASP.NET Web Forms)
- Customize the Report/Data Source Wizard (ASP.NET MVC)
- Customize the Report/Data Source Wizard (ASP.NET Core)
iterator Property
Specifies the wizard’s page iterator.
Declaration
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
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
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
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: 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:
- Customize the Report/Data Source Wizard (ASP.NET Web Forms)
- Customize the Report/Data Source Wizard (ASP.NET MVC)
- Customize the Report/Data Source Wizard (ASP.NET Core)
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.