Order of Events in the Web Viewer
- 4 minutes to read
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.
Event | Description | Note |
---|---|---|
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. | This event is raised if the ASPxDashboardViewer.DashboardId property is specified for the ASPxDashboardViewer. | |
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.
Event | Description | Note |
---|---|---|
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). | ||
The ASPxDashboardViewer.ConfigureDataConnection event allows you to customize settings used to establish a connection to SQL databases, OLAP cubes or Excel Data Sources. Note Note that the ASPxDashboardViewer.DataLoading event is fired instead ASPxDashboardViewer.ConfigureDataConnection if the dashboard is supplied with data using the Object Data Source. | This event is raised if the dashboard is supplied with data using the SQL/OLAP/Excel data source. | |
The ASPxDashboardViewer.ValidateCustomSqlQuery event allows you to check the validity of the custom SQL query used to supply the dashboard with data. | 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. | |
The ASPxDashboardViewer.CustomFilterExpression event allows you to include WHERE clauses in SQL queries for SQL data sources. | 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.
Event | Description | Note |
---|---|---|
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.
Event | Description | Note |
---|---|---|
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.
Event | Description | Note |
---|---|---|
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
Note that the ASPxClientDashboardViewer.Loaded event occurs after the ASPxClientDashboardViewer is loaded.
The following table describes client-side events related to end-user actions or corresponding API method calls.
Event | Description |
---|---|
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. |