Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active November 17, 2020 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/c424ff19719b49856b927db6b6ade8b8 to your computer and use it in GitHub Desktop.
Save bjoerntx/c424ff19719b49856b927db6b6ade8b8 to your computer and use it in GitHub Desktop.
// find the SubTextPart
SubTextPart mergeBlock = textControl1.SubTextParts.GetItem("txmb_location");
// create a new MergeBlockInfo object from SubTextPart
TXTextControl.DocumentServer.DataSources.MergeBlockInfo mbInfo =
new TXTextControl.DocumentServer.DataSources.MergeBlockInfo(mergeBlock);
// add a condition:
// render block, if "id" from parent is greater than 1
mbInfo.BlockMergingCondition.Add(
new TXTextControl.DocumentServer.DataShaping.FilterInstruction(
"id",
TXTextControl.DocumentServer.DataShaping.RelationalOperator.GreaterThan,
1));
// apply conditions
mbInfo.Apply();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment