Skip to main content

ASPxEdit.ReadOnly Property

Gets or sets a value indicating whether an end-user can change the editor’s contents at runtime.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web


public override bool ReadOnly { get; set; }

Property Value

Type Description

true, if an end-user cannot change the editor’s contents; otherwise, false.


Use the ReadOnly property to specify whether the contents of an editor can be modified by an end-user at runtime. For example, setting the ReadOnly property of an ASPxTextBox editor to true, prevents the text displayed within that editor from being changed by an end-user.


This example demonstrates how to define the read-only style for a text box editor.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<script runat="server">

 <html xmlns="" >
 <head id="Head1" runat="server">
     <title>Read-Only Style</title>
     <form id="form1" runat="server">
         Default Appearance
         <dxe:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="170px" Text="Sample text">
         Read-Only Appearance
         <dxe:ASPxTextBox ID="ASPxTextBox2" runat="server" Width="170px" 
          ReadOnly="True" Text="Sample text">
             <ReadOnlyStyle Cursor="default" ForeColor="#A0A0A0">
                 <Border BorderColor="#D0D0D0" />
See Also