Skip to content

How to create new JSON data sources at runtime in a Dashboard control for ASP.NET Core

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/asp-net-core-dashboard-create-json-connections

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard for ASP.NET Core - How to create new JSON data sources at runtime

You can provide end users with the capability to create a new data connection for a JSON Data Source at runtime.

Example Overview

Server

On the server side, implement the IDataSourceWizardConnectionStringsStorage interface to provide an end user with the capability to save the created JSON data connections. Use the created class instance as the ASPxDashboard.SetConnectionStringsProvider / DashboardConfigurator.SetConnectionStringsProvider method's parameter.

Client

To enable the capability for end users, set the allowCreateNewJsonConnection property to true:

Platform API
HTML JavaScript DataSourceWizardExtensionOptions.allowCreateNewJsonConnection
ASP.NET Core DataSourceWizardOptionBuilder.AllowCreateNewJsonConnection(Boolean)
MVC DashboardExtensionSettings.AllowCreateNewJsonConnection
Web Forms ASPxDashboard.AllowCreateNewJsonConnection

After that, the "Choose Connection (JSON)" page allows end users to create new data connections:

Can create new data connections

You can use our test JSON files to try this approach: DataSources.

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)