RepositoryItemGridLookUpEditBase.PopupView Property

Gets or sets the View used to represent data in the dropdown.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[DXCategory("View")]
public ColumnView PopupView { get; set; }
<DXCategory("View")>
Public Property PopupView As ColumnView

Property Value

Type Description
ColumnView

A ColumnView descendant that is currently used to represent data in the dropdown.

Remarks

By default, this property is set to an instance of the GridView class. You can change the View type using one of the following methods:

After you switch the View type, you may need to perform additional customizations of the created View. For instance, after you activate the BandedView or AdvBandedView format, you need to manually create bands and add columns to the bands. Otherwise, these Views cannot display data.

At design time, you can customize the View with the Data Grid Designer. To open the designer, do one of the following:

  • click the ellipsis button for the PopupView property in Properties grid.
  • invoke the Designer View command from the Properties window or the control's smart tag.

GridLookUpEdit-Designer

It's not possible to share a single View between multiple LookUp editors and grid controls.

NOTE

The PopupView property specifies a ColumnView object that is a template for the pop-up view. Based on the template, the editor creates a new ColumnView object that represents the view actually displayed in the pop-up window.

If you customize the view in an event, event arguments refer to the view actually displayed in the pop-up window, not the template view. Do not use objects to identify the view, columns, etc.; use field names, captions, etc. instead. The example below shows how to identify a column in a CustomDrawCell event handler.

private void SearchLookUpEdit1View_CustomDrawCell(object sender, >DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) {
   if (e.Column.FieldName == "MyFieldName") {
       // Your code here.
   }
}
See Also