DxTagBox<TData, TValue>.ReadOnly Property

Specifies whether read-only mode is active.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
[DefaultValue(false)]
public override bool ReadOnly { get; set; }

Property Value

Type Default Description
Boolean

false

true, to activate read-only mode; otherwise, false.

Remarks

Set the ReadOnly property to true to activate read-only mode. <DxTagBox> allows you to display the value, but does not allow users to change it.

<DxTagBox Data="@Fruits"
          @bind-Values="@SelectedFruits"
          ReadOnly="true"
          HideValues="false">
</DxTagBox>

@code {
    String[] Fruits = null;

    IEnumerable<string> SelectedFruits;

    protected override void OnInitialized() {
        Fruits= new string[] { "Apple", "Banana", "Lemon", "Orange", "Pear", "Pinapple", "Peach" };
        SelectedFruits = new List<string>() { DataSource[1], DataSource[4] };
    }
}

Run Demo: TagBox - Read-Only and Disabled Modes

See Also