Skip to main content
All docs
V24.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

RepositoryItemLookUpEdit.MaxDisplayTextLength Property

Gets or sets the maximum number of characters displayed in the edit box.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[Browsable(false)]
[DefaultValue(255)]
[DXCategory("Behavior")]
public int MaxDisplayTextLength { get; set; }

#Property Value

Type Default Description
Int32 255

The maximum number of characters displayed in the edit box. The minimum value is 10.

#Remarks

This property works in Multiple Item Selection mode only. If the total number of characters in the edit box exceeds the MaxDisplayTextLength, the editor displays the ellipsis after the last item. The LookUpEdit displays the last item completely even if it does not fully fit the MaxDisplayTextLength.

LookUpEdit - MaxDisplayTextLength

public Form1() {
    // ...
    lookUpEdit1.Properties.DataSource = Employee.GetSampleData();
    lookUpEdit1.Properties.DisplayMember = "FullName";
    lookUpEdit1.Properties.ValueMember = "ID";
    lookUpEdit1.Properties.EditValueType = DevExpress.XtraEditors.Repository.LookUpEditValueType.ValueList;
    lookUpEdit1.Properties.MaxDisplayTextLength = 15;
}
See Also