# IReadOnly

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (3.2.0.0)

Provides access to the [ReadOnly](#readonly) property for coontrols that support the read-only mode.

{% tabs %}
{% tab title="C#" %}

```csharp
public interface IReadOnly
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Interface IReadOnly
```

{% endtab %}
{% endtabs %}

Using [IReadOnly](https://docs.wisej.com/api/v3.2/wisej.web/interfaces/wisej.web.ireadonly) allows developers to use uniform code to access the read-only properties and events used by the control.

```csharp

// Old code
if (control is TextBox)
((TextBox)control).ReadOnly = true;
else if (control is DataGridView)
((DataGridView)control).ReadOnly = true;
// etc...

// New code
if (control is IReadOnly)
((IReadOnly)control).ReadOnlyy = true;

```

## Properties

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)ReadOnly

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the text box control is read-only.

## Events

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)ReadOnlyChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [ReadOnly](#readonly) property has changed.

## Implemented By

| Name                                                                                                                                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CheckBox](https://docs.wisej.com/api/v3.2/wisej.web/buttons/wisej.web.checkbox)                                                                                      | Represents a check box control.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [CheckedListBox](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/checkedlistbox)                                                                            | Displays a [ListBox](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/listbox) in which a check box is displayed to the left of each item.                                                                                                                                                                                                                                                                                                                                                                           |
| [ComboBox](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/combobox)                                                                                        | Represents a combo box control.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [DateTimePicker](https://docs.wisej.com/api/v3.2/wisej.web/editors/wisej.web.datetimepicker)                                                                          | Represents a control that allows the user to select or type a date and a time.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [DomainUpDown](https://docs.wisej.com/api/v3.2/wisej.web/editors/domainupdown)                                                                                        | Represents a spinner control that displays string values.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [ListBox](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/listbox)                                                                                          | Represents a control to display a list of items.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [MaskedTextBox](https://docs.wisej.com/api/v3.2/wisej.web/editors/maskedtextbox)                                                                                      | Uses a mask to distinguish between proper and improper user input.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [MonthCalendar](https://docs.wisej.com/api/v3.2/wisej.web/editors/monthcalendar)                                                                                      | Represents a control that enables the user to select a date using a visual monthly calendar display.                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [NumericUpDown](https://docs.wisej.com/api/v3.2/wisej.web/editors/wisej.web.numericupdown)                                                                            | Represents a spinner control that displays numeric values.                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [RadioButton](https://docs.wisej.com/api/v3.2/wisej.web/buttons/wisej.web.radiobutton)                                                                                | Enables the user to select a single option from a group of choices when paired with other [RadioButton](https://docs.wisej.com/api/v3.2/wisej.web/buttons/wisej.web.radiobutton) controls.                                                                                                                                                                                                                                                                                                                                    |
| [TextBox](https://docs.wisej.com/api/v3.2/wisej.web/editors/wisej.web.textbox)                                                                                        | Represents a text box control that allows the user to enter any value.                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [TextBoxBase](https://docs.wisej.com/api/v3.2/wisej.web/editors/wisej.web.textboxbase)                                                                                | Implements the basic functionality required by text controls.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [UpDownBase](https://docs.wisej.com/api/v3.2/wisej.web/editors/wisej.web.updownbase)                                                                                  | Implements the basic functionality required by a spin box (also known as an up-down control).                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [DataGridViewComboBoxEditingControl](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxeditingcontrol)             | Represents a [ComboBox](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/combobox) control that can be hosted in a [DataGridViewComboBoxCell](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell).                                                                                                                                                                                                                                                            |
| [DataGridViewDateTimePickerEditingControl](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickereditingcontrol) | Represents a [DateTimePicker](https://docs.wisej.com/api/v3.2/wisej.web/editors/wisej.web.datetimepicker) control that can be hosted in a [DataGridViewDateTimePickerCell](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell).                                                                                                                                                                                                                                  |
| [DataGridViewMaskedTextBoxEditingControl](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxeditingcontrol)   | Represents a [MaskedTextBox](https://docs.wisej.com/api/v3.2/wisej.web/editors/maskedtextbox) control that can be hosted in a [DataGridViewMaskedTextBoxCell](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxcell) cell.                                                                                                                                                                                                                                           |
| [DataGridViewNumericUpDownEditingControl](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowneditingcontrol)   | Represents a [NumericUpDown](https://docs.wisej.com/api/v3.2/wisej.web/editors/wisej.web.numericupdown) control that can be hosted in a [DataGridViewNumericUpDownCell](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncell).                                                                                                                                                                                                                                      |
| [DataGridViewTextBoxEditingControl](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxeditingcontrol)               | Represents a [TextBox](https://docs.wisej.com/api/v3.2/wisej.web/editors/wisej.web.textbox) control that can be hosted in a [DataGridViewTextBoxCell](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcell) cell when the cell's [WrapMode](https://docs.wisej.com/api/v3.2/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle#wrapmode) is set to [False](https://docs.wisej.com/api/v3.2/lists-and-grids/datagridview/wisej.web.datagridviewtristate#fields). |
| [DataGridView](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/datagridview)                                                                                | Represents a data grid control.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [ListViewComboBox](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/wisej.web.listviewcombobox)                                                              | The TreeViewComboBox control represents a [UserComboBox](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/wisej.web.usercombobox) control with a [ListView](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/listview) as the drop down panel.                                                                                                                                                                                                                                                              |
| [TagTextBox](https://docs.wisej.com/api/v3.2/wisej.web/editors/tagtextbox)                                                                                            | Represents a data field that displays a list of selectable and removable tags. The control recognizes tags as the user types and adds in front of the editable field.                                                                                                                                                                                                                                                                                                                                                         |
| [TimeUpDown](https://docs.wisej.com/api/v3.2/wisej.web/editors/timeupdown)                                                                                            | Represents a spinner control that displays [TimeSpan](https://docs.microsoft.com/dotnet/api/system.timespan) values.                                                                                                                                                                                                                                                                                                                                                                                                          |
| [TreeViewComboBox](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/wisej.web.treeviewcombobox)                                                              | The TreeViewComboBox control represents a [UserComboBox](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/wisej.web.usercombobox) control with a [TreeView](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview) as the drop down panel.                                                                                                                                                                                                                                                              |
| [TypedTextBox](https://docs.wisej.com/api/v3.2/wisej.web/editors/wisej.web.typedtextbox)                                                                              | Represents a text box control that allows the user to enter a typed value.                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [UserComboBox](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/wisej.web.usercombobox)                                                                      | The UserComboBox control represents a [ComboBox](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/combobox) control with a custom panel that drops down when the user clicks the down arrow.                                                                                                                                                                                                                                                                                                                         |
| [PropertyGrid](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/propertygrid)                                                                                | Provides a user interface for browsing the properties of an object.                                                                                                                                                                                                                                                                                                                                                                                                                                                           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/v3.2/wisej.web/interfaces/wisej.web.ireadonly.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
