TX Text Control .NET for Windows Forms

GetItems Method

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

Description

Gets those ConditionalInstruction elements from the collection, where at least one Condition or Instruction element references the specified FormField.

Syntax

public ConditionalInstruction[] GetItems(FormField formField);

Parameters

ParameterDescription
formField

Specifies the FormField that is referenced inside the requested ConditionalInstruction elements.

Return Value

The return value is null, if the TextControl.IsFormFieldValidationEnabled property is set to false. Otherwise an array of all ConditionalInstruction elements that references the specified FormField is returned.

Examples

The following example retrieves items from the conditional instruction collection.

ConditionalInstruction[] results = conditionalInstructionCollection.GetItems(new TXTextControl.CheckFormField(true));
foreach (ConditionalInstruction conditionalInstruction in results)
{
    Console.WriteLine(conditionalInstruction);
}