You can provide end users with the capability to create a new data connection for a JSON Data Source at runtime.
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.
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:
You can use our test JSON files to try this approach: DataSources.
(you will be redirected to DevExpress.com to submit your response)