UserDesignerOptions.FieldListMaxExpandLevelOnSearch Property
Specifies how many levels of the field list tree are searched when the user enters text into a search box.
Namespace: DevExpress.XtraReports.Configuration
Assembly: DevExpress.XtraReports.v24.2.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
Property Value
Type | Description |
---|---|
Int32 | Number of levels to expand the tree node and search. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to FieldListMaxExpandLevelOnSearch |
---|---|
ReportingSettings |
|
Settings |
|
Remarks
When a data source contains nested fields, the FieldListMaxExpandLevelOnSearch
property allows you to restrict search to the specified number of levels. Initially it is set to 6. You can specify its value as follows:
DevExpress.XtraReports.Configuration.Settings.Default.UserDesignerOptions.FieldListMaxExpandLevelOnSearch = 4;
Take the following example of an infinitely nested data source:
using DevExpress.DataAccess.ObjectBinding;
using System.Collections.Generic;
using System.ComponentModel;
[HighlightedClass]
[DisplayName("Recurrent Data Source")]
public class RDataProvider {
[HighlightedMember]
[DisplayName("ManagerKey")]
public IEnumerable<ManagerKey> ManagerKey { get; set; }
[HighlightedMember]
[DisplayName("User")]
public IEnumerable<User> User { get; set; }
}
public class User {
public string Name { get; set; }
public string Email { get; set; }
public IEnumerable<ManagerKey> ManagerKeys {get; set; }
}
public class ManagerKey {
public string Name { get; set; }
public string Description { get; set; }
public string ID { get; set; }
public User Manager { get; set; }
}
The FieldListMaxExpandLevelOnSearch
value prevents the search box from infinite recursion. The following image shows the search-as-you-type feature when FieldListMaxExpandLevelOnSearch
is set to 4: