System.Windows.Forms.DataGridViewCell.ReadOnly Property

Gets or sets a value indicating whether the cell's data can be edited.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
public virtual bool ReadOnly { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The DataGridViewCell.ReadOnly property indicates whether the data displayed by the cell can be edited. You can set DataGridViewCell.ReadOnly for individual cells, or you can make an entire row or column of cells read-only by setting the DataGridViewRow.ReadOnly or DataGridViewColumn.ReadOnly properties. By default, if a cell's parent row or column is set to read-only, the child cells will adopt the same value. You can override this default behavior by setting DataGridViewCell.ReadOnly for individual cells.

You can navigate to a read-only cell, and you can set a read-only cell to be the current cell.

DataGridViewCell.ReadOnly only affects whether a cell is editable; it does not affect whether the user can delete rows.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0