InsertMergeBlockDialog Constructor
- Namespace
TXTextControl.DocumentServer. Windows. Forms
- Package
TXTextControl.asTextControl. WinForms. SDK TXDocumentServer.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Creates a InsertMergeBlockDialog object for the specified DocumentServer.DataSources.DataSourceManager.
Syntax
public InsertMergeBlockDialog(DataSourceManager dataSourceManager, object textControl, DataTableInfo tableInfo);Public Sub New(dataSourceManager As DataSourceManager, textControl As Object, tableInfo As DataTableInfo)Parameters
| Parameter | Description |
|---|---|
| dataSourceManager | Specifies the DataSourceManager which manages the current data source. |
| textControl | A TextControl or a ServerTextControl instance containing the document into which the merge block is inserted. |
| tableInfo | Specifies the DataTableInfo which represents the table the new merge block is based on. |
Examples
The following example loads a small customer data source, selects its master table, and opens the merge-block dialog only when merging is available.
TXTextControl.DocumentServer.DataSources.DataSourceManager dataSourceManager = new();
dataSourceManager.LoadJson("[{\"CustomerName\":\"Contoso Ltd.\"}]");
TXTextControl.DocumentServer.DataSources.DataTableInfo tableInfo = dataSourceManager.MasterDataTableInfo;
using TXTextControl.DocumentServer.Windows.Forms.InsertMergeBlockDialog dialog = new(dataSourceManager, textControl, tableInfo);
if (dataSourceManager.IsMergingPossible)
{
dialog.ShowDialog();
}Dim dataSourceManager As New TXTextControl.DocumentServer.DataSources.DataSourceManager()
dataSourceManager.LoadJson("[{""CustomerName"":""Contoso Ltd.""}]")
Dim tableInfo As TXTextControl.DocumentServer.DataSources.DataTableInfo = dataSourceManager.MasterDataTableInfo
Using dialog As New TXTextControl.DocumentServer.Windows.Forms.InsertMergeBlockDialog(dataSourceManager, textControl, tableInfo)
If dataSourceManager.IsMergingPossible Then dialog.ShowDialog()
End Using