The DataPresenter controls populate the list of operators based on the data type of the field. However, you can modify the list of operators that your end users can select by setting a FieldSettings object’s FilterOperatorDropDownItems property to a bitwise combination of ComparisonOperatorFlags enumeration values. For example, you can modify the list of operators so that only the StartsWith and EndsWith operators are available for your end users in the drop-down list of operators.
The following example code demonstrates how to modify the list of operators.
In XAML:
<igDP:XamDataPresenter Name="xamDataPresenter1"> <igDP:XamDataPresenter.FieldSettings> <igDP:FieldSettings AllowRecordFiltering="True" FilterOperatorDropDownItems="StartsWith, EndsWith" /> </igDP:XamDataPresenter.FieldSettings> </igDP:XamDataPresenter>
In Visual Basic:
Imports Infragistics.Windows.Controls ... Me.xamDataPresenter1.FieldSettings.FilterOperatorDropDownItems = ComparisonOperatorFlags.StartsWith Or ComparisonOperatorFlags.EndsWith
In C#:
using Infragistics.Windows.Controls; ... this.xamDataPresenter1.FieldSettings.FilterOperatorDropDownItems = ComparisonOperatorFlags.StartsWith | ComparisonOperatorFlags.EndsWith;