Skip to main content
A newer version of this page is available. .

Disable Editing

  • 2 minutes to read

The GridControl provides the following approaches to disable editing:

Approach

Applies to a Cell

Applies to a Column

Applies to a View

Affects Selection / Navigation

Opens a Cell Editor

DataViewBase.NavigationStyle

no

no

yes

yes

no

DataViewBase.AllowEditing

no

no

yes

no

no

ColumnBase.AllowEditing

no

yes

no

no

no

ColumnBase.ReadOnly

no

yes

no

no

yes

ColumnBase.AllowFocus

no

yes

no

yes

no

ShowingEditor

yes

yes

yes

no

no

DataViewBase.NavigationStyle

Set the DataViewBase.NavigationStyle property to None to prevent end users from focusing cells/rows.

  • Applies to a Cell: no
  • Applies to a Column: no
  • Applies to a View: yes
  • Affects Selection / Navigation: yes
  • Opens a Cell Editor: no

DataViewBase.AllowEditing

Set the DataViewBase.AllowEditing property to false to prevent end users from editing cell values within the view.

  • Applies to a Cell: no
  • Applies to a Column: no
  • Applies to a View: yes
  • Affects Selection / Navigation: no
  • Opens a Cell Editor: no

ColumnBase.AllowEditing

Set the ColumnBase.AllowEditing property to false to prevent end users from editing cell values within the column.

  • Applies to a Cell: no
  • Applies to a Column: yes
  • Applies to a View: no
  • Affects Selection / Navigation: no
  • Opens a Cell Editor: no

ColumnBase.ReadOnly

Set the ColumnBase.ReadOnly property to true to allow end users to open the cell editor in read-only mode.

  • Applies to a Cell: no
  • Applies to a Column: yes
  • Applies to a View: no
  • Affects Selection / Navigation: no
  • Opens a Cell Editor: yes

ColumnBase.AllowFocus

Set the ColumnBase.AllowFocus property to false to prevent end users from focusing column cells.

  • Applies to a Cell: no
  • Applies to a Column: yes
  • Applies to a View: no
  • Affects Selection / Navigation: yes
  • Opens a Cell Editor: no

ShowingEditor

Handle the GridViewBase.ShowingEditor / TreeListView.ShowingEditor event to prevent end users from opening a corresponding cell editor.

  • Applies to a Cell: yes
  • Applies to a Column: yes
  • Applies to a View: yes
  • Affects Selection / Navigation: no
  • Opens a Cell Editor: no