Back to Devexpress

OptionsColumn.AllowEdit Property

windowsforms-devexpress-dot-xtragrid-dot-columns-dot-optionscolumn.md

latest6.4 KB
Original Source

OptionsColumn.AllowEdit Property

Specifies if users can edit column values in grid cells (inplace edit mode).

Namespace : DevExpress.XtraGrid.Columns

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(true)]
[XtraSerializableProperty]
public bool AllowEdit { get; set; }
vb
<DefaultValue(True)>
<XtraSerializableProperty>
Public Property AllowEdit As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true to allow users to edit cell values; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowEdit
GridColumn

.OptionsColumn .AllowEdit

|

Remarks

The AllowEdit option is in effect if the View’s ColumnView.Editable property is set to true and the EditingMode property is set to Default or Inplace.

Users cannot edit values in merged cells (see the OptionsColumn.AllowMerge and GridOptionsView.AllowCellMerge properties). The AllowEdit property has no effect on merged cells.

Example

csharp
colCity.OptionsColumn.AllowEdit = false;
vb
colCity.OptionsColumn.AllowEdit = False

The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowEdit property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XAF-how-to-add-an-unbound-column-to-gridlisteditor-to-execute-a-custom-action-for-a-record/CS/EFCore/ButtonInListEF/ButtonInListEF.Win/Controllers/SimpleBusinessActionGridListViewController.cs#L61

csharp
buttonColumn.VisibleIndex = 0;
buttonColumn.OptionsColumn.AllowEdit = true;
buttonColumn.OptionsColumn.AllowGroup = DefaultBoolean.False;

winforms-grid-image-slider-cell-editor/CS/WindowsFormsApplication202/ImageSliderHelper.cs#L29

csharp
view.Columns["Image"].ColumnEdit = repository;
view.Columns["Description"].OptionsColumn.AllowEdit = false;
view.RowHeight = slider.Size.Height;

winforms-grid-multiple-row-selection-web-style-checkboxes/CS/E1271/CheckMarkSelection.cs#L123

csharp
column.OptionsColumn.ShowCaption = false;
column.OptionsColumn.AllowEdit = false;
column.OptionsColumn.AllowSize = false;

winforms-grid-tokenedit-in-unbound-column/CS/Form1.cs#L56

csharp
};
col.OptionsColumn.AllowEdit = true;
gridView.Columns.Add(col);

winforms-grid-image-slider-cell-editor/VB/WindowsFormsApplication202/ImageSliderHelper.vb#L33

vb
view.Columns("Image").ColumnEdit = repository
view.Columns("Description").OptionsColumn.AllowEdit = False
view.RowHeight = slider.Size.Height

winforms-grid-multiple-row-selection-web-style-checkboxes/VB/E1271/CheckMarkSelection.vb#L152

vb
column.OptionsColumn.ShowCaption = False
column.OptionsColumn.AllowEdit = False
column.OptionsColumn.AllowSize = False

winforms-grid-tokenedit-in-unbound-column/VB/Form1.vb#L53

vb
Dim col As GridColumn = New GridColumn() With {.Name = "col", .Caption = "Unbound Col", .FieldName = "col", .Visible = True, .UnboundType = UnboundColumnType.Object}
col.OptionsColumn.AllowEdit = True
gridView.Columns.Add(col)

See Also

Editable

EditingMode

ReadOnly

ShowingEditor

OptionsColumn Class

OptionsColumn Members

DevExpress.XtraGrid.Columns Namespace