ASPxDashboard - How to specify a dashboard state manually in code
ASP.NET MVC Dashboard Extension - How to specify a default dashboard state in code
ASP.NET MVC Dashboard - How to bind a dashboard to an Object Data Source and provide data using a custom fill service
ASPxDashboard - How to show a dashboard item's client and underlying data for a clicked visual element
This example demonstrates how to obtain client and underlying data corresponding to a particular visual element and display this data in a popup. You can click individual cards within the Card dashboard item to see detailed information.
ASPxDashboard - How to create a custom dashboard item extension
To learn more information about the custom item creating, see T491984.
See also:
T541040: MVC Dashboard - How to create a custom dashboard item extension
ASP.NET MVC Dashboard - How to create a custom dashboard item extension
To learn more information about the custom item creating, see T491984.
See also:
T509294: Web Dashboard - How to create a custom dashboard item extension
ASPxDashboard - How to implement server-side export
This example demonstrates how to export a dashboard displayed in ASPxDashboard on the server side using the ASPxDashboardExporter class. The following API is used to implement this capability.
- The ASPxDashboard.CustomJSProperties server-side event is used to pass information about available dashboards to the client side.
- The ASPxClientDashboard.LoadDashboard method opens a selected dashboard.
- The ASPxClientDashboard.PerformDataCallback client-side method is used to pass the dashboard identifier and state to the server side. On the server side, the ASPxDashboard.CustomDataCallback event is used to obtain and parse these values.
- ASPxDashboardExporter.ExportToPdf is used to export the selected dashboard with the state passed from the client side.
Question Comments
Added By: Mahesh Jathar at: 9/18/2017 3:42:54 AM How this functionality will be implemented in mvc? Please guide. Added By: Maxim (DevExpress Support) at: 9/18/2017 6:06:03 AM
Hello Mahesh,
I've created a separate ticket on your behalf (T556305: How to implement server-side export in the MVC.NET Dashboard Control). It has been placed in our processing queue and will be answered shortly.
ASP.NET Core Dashboard - Getting Started - Create an ASP.NET Core Dashboard Designer (Runtime sample)
ASP.NET MVC Dashboard - Getting Started - Creating an ASP.NET MVC Dashboard Designer Application (Runtime sample)
Web Dashboard - How to create the HTML5 JavaScript Web Dashboard application
See Also
T532254: How to create the HTML5 JavaScript Web Dashboard application (CTP)
T543243: How to customize the client side of the HTML5 JavaScript Web Dashboard application (CTP)
ASP.NET MVC Dashboard - How to obtain data for Web Dashboard from online spreadsheets
This is a sample project that connects Dashboard to a Google Drive spreadsheet. Follow the steps below to create a data source based on the online spreadsheet:
1. Set MvcDashboard as a startup project and launch the application.
2. Click the 'Sign in GoogleDrive' button to sign into the Google Account and allow the current application to view files in your Google Drive.
3. After redirection click the 'Add New ExcelDataSource' button to select the required spreadsheet file and data (like sheets, tables, or named ranges).
The created data source is now available for your dashboards.
Note that this sample project is a prototype that shows the possibility of using a third-party API to extend the Web Dashboard functionality. We do not plan to make access to Google Drive a built-in feature in Web Dashboard in the near future, but you can use the provided project as a starting point to implement this functionality in your project.
See also
DevExpress Blogs - Connect Dashboard to a Google Drive Spreadsheet
ASP.NET MVC Dashboard - How to bind a dashboard to an Entity Framework Data Source (Runtime sample)
The following example shows how to add the Entity Framework data source to the Web Dashboard's list of data sources available to end-users. In this example, the DashboardEFDataSource class is used to establish a connection to the Entity Framework data source.
ASP.NET MVC Dashboard - How to bind a dashboard to an Object Data Source and supply it with data using the DataLoading event
ASPxDashboard - How to bind a dashboard to an Object Data Source and supply it with data using the DataLoading event
Question Comments
Added By: Joe Cassaly at: 10/31/2017 2:48:52 PM This doesn't work for me. I get the following error.
Dashboard loading settings conflict. Use one of the following approaches to load a dashboard:
-Specify a path to the dashboard XML file using the DashboardXmlPath property.
-Call the OpenDashboard method.
-Provide a dashboard created at design time using the DashboardType property.
-Provide a path to a folder containing dashboards using DashboardStorageFolder.
-Use the SetDashboardStorage to specify a custom dashboard storage.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: Dashboard loading settings conflict. Use one of the following approaches to load a dashboard:
-Specify a path to the dashboard XML file using the DashboardXmlPath property.
-Call the OpenDashboard method.
-Provide a dashboard created at design time using the DashboardType property.
-Provide a path to a folder containing dashboards using DashboardStorageFolder.
-Use the SetDashboardStorage to specify a custom dashboard storage.
Added By: Alex (DevExpress Support) at: 11/1/2017 12:06:46 PM Hi Joe,
I am afraid I cannot reproduce a similar error when testing the sample project using the latest version (v17.1) of DevExpress assemblies. The sample project uses the DashboardFileStorage object to set the dashboard storage folder to "~/App_Data/Dashboards". If you have modified the sample project source code (e.g., by initializing the ASPxDashboard.DashboardXmlPath property), remove the DashboardFileStorage object initialization from the Page_Load event handler. Should you need further clarification, feel free to ask. We will be happy to help you.
ASPxDashboard - How to save/load the custom data to/from the dashboard XML definition
This example demonstrates how to save the custom data related to a dashboard to the dashboard XML definition and how to load this data later. In this example, the standard 'Save' menu item removed from the Web Dashboard menu. A new 'Save As' menu item allows end-users to add a custom comment appended to the dashboard XML definition. Moreover, the current dashboard state and modified date is added to the XML definition.
You can load dashboards containing custom data using the 'Open' menu item. A comment and modified date form the selected dashboard is displayed within the form at the top of the web page. The loaded dashboard state is applied to the dashboard using a client-side API.
The following API is used to implement these capabilities:
- The ASPxClientDashboard.GetDashboardControl method is called within the ASPxClientDashboard.BeforeRender event handler to customize the standard Web Dashboard menu.
- The ASPxClientDashboard.PerformDataCallback client-side method is used to pass the custom data to the server side. On the server side, the ASPxDashboard.CustomDataCallback event is used to obtain and parse these values. These values are saved to the dashboard XML definition using the Dashboard.UserData property.
- The ASPxDashboard.DashboardLoading event is handled to obtain the custom data from the UserData element when loading a dashboard.
- The ASPxDashboard.CustomJSProperties server-side event is used to pass the custom data obtained to the client side.
- The ASPxClientDashboard.DashboardChanged event is handled to display custom data related to the selected dashboard. Moreover, the SetDashboardState method applies the dashboard state.
ASPxDashboard - How to obtain a dashboard item's underlying data for a clicked visual element
The following example demonstrates how to get underlying data corresponding to a particular visual element using the ASPxClientDashboard's API.
In this example, the ASPxClientDashboard.ItemClick event is handled to obtain underlying data and invoke the dxPopup widget with the child dxDataGrid. In the event handler, the RequestUnderlyingData method is called to obtain records from the dashboard's data source. The dxDataGrid is used to display these records.
ASPxDashboard - How to obtain underlying data for the specified dashboard item
The following example demonstrates how to get underlying data for the specified dashboard item using the ASPxClientDashboard.RequestUnderlyingData method. This method accepts the component name of the dashboard item and specific parameters used to request data.
ASPxDashboard - How to save a dashboard state to cookies and restore this state on the server side
The sample illustrates how to save the current ASPxDashboard state (such as master filter or parameter values) to cookies on the client side and restore this state on the server side. The following API is used in this example:
- The ASPxClientDashboard.DashboardStateChanged event is handled to obtain the current dashboard state.
- The ASPxClientUtils.SetCookie client-side method is used to save the dashboard state to cookies.
- In the ASPxDashboard.SetInitialDashboardState event handler, the dashboard state is loaded from the cookies and applied to a dashboard.
ASPxDashboard - How to perform a drill-down in code
The following example demonstrates how to perform a drill-down in ASPxDashboard on the client side.
In this example, the ASPxClientDashboard.PerformDrillDown method is used to perform a drill-down for a specified row in a Grid dashboard item. The dxSelectBox widget contains categories for which a drill-down can be performed. These categories are obtained using the ASPxClientDashboard.GetAvailableDrillDownValues method. Select a required category and click the Perform Drill-Down button to perform a drill-down by the selected category.
When the Grid displays a list of products (the bottom-most detail level), you can only perform a drill-up action that returns you to the top detail level. The ASPxClientDashboard.PerformDrillUp method is called to do this.
ASP.NET MVC Dashboard - How to perform a drill-down in code
The following example demonstrates how to perform a drill-down in the ASP.NET MVC Dashboard Extension on the client side.
In this example, the ASPxClientDashboard.PerformDrillDown method is used to perform a drill-down for a specified row in a Grid dashboard item. The dxSelectBox widget contains categories for which a drill-down can be performed. These categories are obtained using the ASPxClientDashboard.GetAvailableDrillDownValues method. Select a required category and click the Perform Drill-Down button to perform a drill-down by the selected category.
When the Grid displays a list of products (the bottom-most detail level), you can only perform a drill-up action that returns you to the top detail level. The ASPxClientDashboard.PerformDrillUp method is called to do this.