MergeBlockInfo Class
- Namespace
TXTextControl.DocumentServer. DataSources
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WPF. SDK
- Assembly
TXDocumentServer.dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WPF. SDK TXDocumentServer.from the setup.dll
Description
The MergeBlockInfo class is used to insert a table or paragraph based repeating merge block into a TextControl instance using the DataSourceManager.InsertMergeBlock method.
Syntax
public class MergeBlockInfoPublic Class MergeBlockInfoExamples
The following example creates a Merge Block Info instance for a document-processing operation. The created object is then available to the surrounding document workflow.
TXTextControl.DocumentServer.DataSources.MergeBlockInfo mergeBlockInfo = new("CustomerName");
Console.WriteLine("Merge Block Info is ready for use.");Dim mergeBlockInfo As New TXTextControl.DocumentServer.DataSources.MergeBlockInfo("CustomerName")
Console.WriteLine("Merge Block Info is ready for use.")Members
Constructors
| Constructor | Description |
|---|---|
| MergeBlockInfo | Initializes a new instance of the MergeBlockInfo class. |
Properties
| Property | Description |
|---|---|
| BlockMergingCondition | Gets or sets a condition the parent data row of this merge block has to satisfy so that this merge block is merged at all. To keep the merge block independent of a condition just leave this property at the default value null. |
| ChildBlocks | Gets or sets the list of merge blocks nested inside this merge block. |
| ColumnNames | Gets or sets the list of data column names which represent the merge fields this merge block consists of. |
| Filters | Gets or sets a list of filter instructions which are used to filter the data rows before merging. To not filter the block data, just leave this property empty or set it to null. |
| MergeFields | Returns the merge fields inside this merge block excluding fields in possible nested merge blocks. |
| SortingInstructions | Gets or sets a list of sorting instructions which are used to sort the data rows before merging. To not sort the block data, just leave this property empty or set it to null. |
| TableName | Gets the table name of this merge block. |
Methods
| Method | Description |
|---|---|
| Apply | Stores the meta data (filters, sorting instructions and the block merging condition) in the SubTextPart which represents the block. Manipulating any of the aforementioned collections does not update the block automatically, so this method must be called to actually store changes. If a MergeBlockInfo instance is not based on an existing SubTextPart, this method throws an exception. |