TX Text Control .NET for Windows Forms

InsertMergeBlock Method

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

Description

Inserts a repeating merge block into a TextControl instance, a WPF.TextControl instance or a ServerTextControl instance at the current input position.

Syntax

public void InsertMergeBlock(object textControl, MergeBlockInfo mergeBlockInfo, MergeBlockSettings settings);

Parameters

ParameterDescription
textControl

A TextControl instance, a WPF.TextControl instance or a ServerTextControl instance.

mergeBlockInfo

A MergeBlockInfo object which describes the merge block to insert into the TextControl instance.

settings

A MergeBlockSettings object which describes the settings of the merge block to insert into the TextControl instance.

Examples

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

dataSourceManager.InsertMergeBlock("Approved", new TXTextControl.DocumentServer.DataSources.MergeBlockInfo("CustomerName"), new TXTextControl.DocumentServer.DataSources.MergeBlockSettings());
Console.WriteLine("Data Source Manager is ready for use.");

Further Reading

  • Merge Blocks in X16: Filtering, Sorting and Conditional Rendering –