Order of Events in the Web Viewer
The process of loading/using a dashboard in the ASPxDashboardViewer can be divided into the following steps.
- 1. Loading a Dashboard
- 2. Providing Data
- 3. Setting Up a Filter State
- 4. Customizing Dashboard Items
- 5. Customizing Underlying Widgets
- 6. Using a Dashboard
This topic describes the server-side and client-side events that are raised during each operation.
1. Loading a Dashboard
The following table shows the events related to initial dashboard loading.
The ASPxDashboardViewer.CustomJSProperties event enables you to supply any server data that can then be parsed on the client.
The ASPxDashboardViewer.DashboardLoading event allows you to load a dashboard at runtime.
The ASPxDashboardViewer.DashboardLoaded event is raised when the dashboard is being loaded.
You can use the DashboardLoadedWebEventArgs.Dashboard event parameter to customize the dashboard before it is loaded to the Dashboard Viewer.
2. Providing Data
The following table shows the order of events related to data binding.
The ASPxDashboardViewer.CustomParameters event is raised before the Dashboard Viewer sends a query to a database server and allows you to specify parameter settings (for instance, specify a parameter value).
This event is raised each time the custom SQL query, which is used to supply the dashboard with data, needs to be validated. This is true if the SQL Data Source is used as a dashboard data source and the custom SQL query is used to select data.
This event is raised if the dashboard is supplied with data using the SQL data source.
3. Setting Up a Filter State
The following table describes the events related to default filter state of filter elements and master filter items.
|ASPxDashboardViewer.MasterFilterDefaultValues||The ASPxDashboardViewer.MasterFilterDefaultValues event allows you to apply default filtering to master filter items.|
|ASPxDashboardViewer.RangeFilterDefaultValue||The ASPxDashboardViewer.RangeFilterDefaultValue provides the capability to apply default filtering to a Range Filter dashboard item.||This event is raised if the dashboard contains a Range Filter dashboard item.|
4. Customizing Dashboard Items
The following table describes client-side events that allow you to customize a dashboard and dashboard items before the dashboard will be opened.
The ASPxClientDashboardViewer.ItemElementCustomColor event allows you to color the required dashboard item elements (for instance, chart series points, pie segments) using the specified colors.
This event is raised if the dashboard contains one of the following dashboard items.
The ASPxClientDashboardViewer.ItemVisualInteractivity event allows you to provide custom visual interactivity for data-bound dashboard items that support element selection and highlighting.
This event is raised if the dashboard contains dashboard items that support element selection and highlighting.
5. Customizing Underlying Widgets
If necessary, you can customize client widgets used to visualize data within dashboard items using the following events.
The ASPxClientDashboardViewer.ItemWidgetCreated event allows you to access underlying widgets. Handle this event to subscribe to events of the client widget.
This event is raised if the dashboard contains specific items. To learn more, see Access to Underlying Widgets.
ASPxClientDashboardViewer.ItemWidgetUpdating/ASPxClientDashboardViewer.ItemWidgetUpdated events are raised when the client widget needs to be updated. For instance, this can be related to applying master filtering or changing parameter values. Handle the ASPxClientDashboardViewer.ItemWidgetUpdating event to unsubscribe from events of the client widget. To customize widgets according your requirements, handle the ASPxClientDashboardViewer.ItemWidgetUpdated event.
These events are raised if the dashboard contains specific items. To learn more, see Access to Underlying Widgets.
6. Using a Dashboard
The following table describes client-side events related to end-user actions or corresponding API method calls.
These events are raised when the master filter/selection state is changed.
These events are raised when drill down/drill up is performed.
This event occurs when an end-user clicks a dashboard item.