CriteriaOperator.MaxParseOperands Property
Specifies the maximum number of operands in a single group or list that the criteria parser accepts.
Namespace: DevExpress.Data.Filtering
Assembly: DevExpress.Data.v26.1.dll
NuGet Package: DevExpress.Data
Declaration
Property Value
| Type | Description |
|---|---|
| Int32 | The maximum number of operands in a single group or list. The default value is DefaultMaxParseOperands (16384). Zero or a negative value disables the limit. |
Remarks
The MaxParseOperands property limits the number of operands in a single And/Or group, In (...) list, Iif argument list, or function argument list in a criteria string. The parser counts operands in nested groups and lists separately.
If a criteria string exceeds the limit, the parser throws a CriteriaParserLimitException. The CriteriaParserLimitException.Kind property returns CriteriaParserLimitKind.Operands.
The limit applies to the entire process. The parser reads the property value each time it parses a string. Set the property once at application startup, before the application parses criteria strings.
The default value does not affect realistic filters. If your application accepts only short and simple filters, lower the limit.
Warning
Raise or disable this limit only after you verify that your application can safely process larger input. A criteria string with many operands from an untrusted source can cause a denial of service.
The limit applies only to criteria strings. Criteria trees that you build in code are not subject to this limit.
using DevExpress.Data.Filtering;
// Call at application startup.
CriteriaOperator.MaxParseOperands = 1000;
For additional information, refer to the following help topic: Criteria String Parsing and Untrusted Input.