TX Text Control .NET for WPF

LoadDataSourceConfig Method

Method|Introduced in 24.0
Namespace
TXTextControl.DocumentServer.DataSources
Package
TXTextControl.TextControl.WPF.SDK as TXDocumentServer.dll from the private NuGet feed or Text Control Offline Packages

Description

Loads an XML string or a file containing "report data source configuration" data. Data Source Configuration Files can only be used in Windows Forms applications. When calling this method from a WPF Application, an exception is thrown. For more information about data source configuration files see method SaveDataSourceConfig.

Syntax

LoadDataSourceConfig()

Shows the system's default open file dialog where a configuration file can be selected.

public void LoadDataSourceConfig();

LoadDataSourceConfig(object)

Shows the system's default open file dialog where a configuration file can be selected.

public void LoadDataSourceConfig(object owner);
ParameterDescription
owner

An object that represents the top-level window that will own the modal dialog box.

LoadDataSourceConfig(string)

Loads XML configuration data given as a string.

public void LoadDataSourceConfig(string configData);
ParameterDescription
configData

A string containing XML configuration data.

Examples

The following example uses Load Data Source Config in a focused Data Source Manager workflow. The created object is then available to the surrounding document workflow.

dataSourceManager.LoadDataSourceConfig("Approved");
Console.WriteLine("Data Source Manager is ready for use.");