The main idea of the demonstrated approach is to load a corresponding SNX template into a temporary SnapDocumentServer instance and copy items from the SnapDocumentServer.Document.DataSources collection into a current SnapControl document.
In this sample, data sources are loaded from two templates: "nwindDataSourceTemplate.snx" and "carsDataBaseTemplate.snx".
In the attachment you can find a video which demonstrates how these templates were created.
Please take special note that the use of the SnapDocumentServer instance in an application requires adding a reference to the DevExpress.Docs assembly. This assembly is shipped only with the Universal subscription or with a separate Document Server subscription:
https://www.devexpress.com/Subscriptions/
↧
How to load only Data Sources information from an SNX file into a SnapControl document
↧