Created
July 16, 2021 14:39
-
-
Save bjoerntx/550b13132ccd30dbedb4266a651a7c6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// check if there is a SubTextPart at the | |
// current input position | |
if (textControl1.SubTextParts.GetItem() == null) | |
return; | |
// retrieve current SubTextPart | |
SubTextPart stpMergeBlock = textControl1.SubTextParts.GetItem(); | |
// check if SubTextPart is a MergeBlock | |
if (TXTextControl.DocumentServer.DataSources.DataSourceManager.IsMergeBlock( | |
textControl1.SubTextParts.GetItem()) == true) { | |
// create a MergeBlockInfo object from SubTextPart | |
TXTextControl.DocumentServer.DataSources.MergeBlockInfo mbInfo = | |
new TXTextControl.DocumentServer.DataSources.MergeBlockInfo(stpMergeBlock); | |
// add a filter | |
mbInfo.Filters.Add( | |
new TXTextControl.DocumentServer.DataShaping.FilterInstruction( | |
"Price", | |
TXTextControl.DocumentServer.DataShaping.RelationalOperator.GreaterThan, | |
500)); | |
mbInfo.SortingInstructions.Add( | |
new TXTextControl.DocumentServer.DataShaping.SortingInstruction( | |
"Price", | |
TXTextControl.DocumentServer.DataShaping.SortOrder.Ascending)); | |
// important: apply the settings | |
mbInfo.Apply(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment