Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DetailViewLayoutAttribute.ColumnPosition Property

Returns the LayoutColumnPosition collection.

Namespace: DevExpress.ExpressApp.Model

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

public LayoutColumnPosition? ColumnPosition { get; }

#Property Value

Type Description
Nullable<LayoutColumnPosition>

The position of a column in which the editor of the target property is placed.

Available values:

Name Description
Left

The editor is located in the left column.

Right

The editor is located in the right column.

#Remarks

This property is in effect if the target property is in the SimpleEditors layout group with two columns. The second column is generated automatically when the number of editors in a group is more than the EditorsMaxCountForLayoutInFlow value.

C#
public class Contact : BaseObject {
    [DetailViewLayoutAttribute(LayoutColumnPosition.Left)]
    public virtual string FirstName { get; set; }
    [DetailViewLayoutAttribute(LayoutColumnPosition.Right)]
    public virtual string LastName { get; set; }
    [DetailViewLayoutAttribute("FullName", 0)]
    public string FullName {
        get { return FirstName + " " + LastName; }
    }
    [DetailViewLayoutAttribute(LayoutColumnPosition.Left)]
    public virtual string Email { get; set; }
    [DetailViewLayoutAttribute(LayoutColumnPosition.Right)]
    public virtual Contact Manager { get; set; }
    [DetailViewLayoutAttribute(LayoutColumnPosition.Left)]
    public virtual DateTime? Birthday { get; set; }
    [FieldSize(FieldSizeAttribute.Unlimited)]
    [DetailViewLayoutAttribute("NotesAndRemarks", LayoutGroupType.TabbedGroup, 100)]
    public virtual string Notes { get; set; }
    [FieldSize(FieldSizeAttribute.Unlimited)]
    [DetailViewLayoutAttribute("NotesAndRemarks", LayoutGroupType.TabbedGroup, 100)]
    public virtual string Remarks { get; set; }
}

// Make sure that you use options.UseChangeTrackingProxies() in your DbContext settings.

For information on other ways to customize a Detail View layout, refer to the following help topic: Detail View Layout Customization.

See Also