Skip to main content
A newer version of this page is available. .

VisibleInLookupListViewAttribute Class

Specifies whether the column that corresponds to the target business class property is initially visible in a Lookup Property Editor’s List View.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true)]
public class VisibleInLookupListViewAttribute :
    ModelExportedBoolValueAttribute

Remarks

By default, an Object type business class property is displayed via a Lookup Property Editor. In the drop-down frame of this Property Editor, there is a List View that displays a collection of existing objects of the specified type.

LookupPropetyEditors_1

By default, a Lookup Property Editor’s List View displays the properties that use the FriendlyKeyPropertyAttribute and/or DefaultProperty attribute. However, you can display any business class property in that List View by applying the VisibleInLookupListView attribute to this property, and passing true as the attribute’s value parameter. If the business class has no default property, all its properties are visible in a Lookup List View. In this case, you can hide a certain property by applying the VisibleInLookupListView attribute to this property, and passing false as the attribute’s value parameter. To learn more about the rules used to generate the default columns set in List Views, refer to the List View Column Generation topic.

The value passed as the VisibleInLookupListView attribute’s value parameter is set for the read-only IModelMember.IsVisibleInLookupListView property of the Application Model‘s BOModel | <Class> | OwnMembers | <Member> node. Use the Model Editor to see whether a particular property is visible in a Lookup List View.

Note

In ASP.NET applications, the ASPxComboBox control with a single column is used when the LookupEditorModeAttribute.Mode property is set to LookupEditorMode.AllItems. It is not possible to show multiple data columns in this mode. Change the mode to AllItemsWithSearch or Search to show several columns. You can also introduce a new calculated string property which combines the values you are going to display, and show it in a lookup.

Inheritance

Object
Attribute
DevExpress.Persistent.Base.ModelExportedValueAttribute
DevExpress.Persistent.Base.ModelExportedBoolValueAttribute
VisibleInLookupListViewAttribute
See Also