Back to Devexpress

ColumnBase.AllowEditing Property

wpf-devexpress-dot-xpf-dot-grid-dot-columnbase-ead69a45.md

latest5.5 KB
Original Source

ColumnBase.AllowEditing Property

Gets or sets whether users can edit column values. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public DefaultBoolean AllowEditing { get; set; }
vb
Public Property AllowEditing As DefaultBoolean

Property Value

TypeDescription
DefaultBoolean

A value that specifies whether an end user can edit cell values.

|

Available values:

NameDescriptionReturn Value
True

The value is true.

|

0

| | False |

The value is false.

|

1

| | Default |

The value is specified by a global option or a higher-level object.

|

2

|

Remarks

Users can edit data if the DataViewBase.AllowEditing property is set to true and the DataViewBase.NavigationStyle property is set to GridViewNavigationStyle.Cell.

Individual columns provide the AllowEditing property, allowing the default behavior specified by the view to be overridden. Set this property to true or false to override the default behavior. This can be useful when it is required to prevent an end user from changing values of individual columns.

If the AllowEditing property is set to Default , the ability to edit data is controlled by the DataViewBase.AllowEditing property.

Tip

Set the ColumnBase.ReadOnly to true to prevent users from editing column values, but allow users to select and copy cell text.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowEditing 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.

wpf-data-grid-implement-crud-operations/CS/CodeBehind/EFCore/PagedAsyncSource/MainWindow.xaml#L26

xml
<dxg:GridColumn FieldName="Id" IsSmart="True"
                AllowEditing="True" ReadOnly="True" />
<dxg:GridColumn FieldName="Subject" IsSmart="True"

wpf-data-grid-bind-to-infiniteasyncsource/CS/InfiniteAsyncSourceSample/MainWindow.xaml#L17

xml
<dxg:GridControl.Columns>
    <dxg:GridColumn FieldName="Id" IsSmart="True" AllowEditing="True" Width="*"/>
    <dxg:GridColumn FieldName="Subject" IsSmart="True" AllowEditing="True" Width="2*"/>

how-to-bind-to-grpc/CS/InfiniteAsyncSource.GRPC/MainWindow.xaml#L29

xml
<dxg:GridControl.Columns>
  <dxg:GridColumn FieldName="Id" IsSmart="True" Width="*" AllowEditing="true"/>
  <dxg:GridColumn FieldName="Subject" IsSmart="True" Width="2*" AllowEditing="true"/>

wpf-data-grid-display-datetime-value-in-separate-date-and-time-columns/CS/DateAndTimeColumns_Unbound/MainWindow.xaml#L17

xml
<dxg:GridControl.Columns>
    <dxg:GridColumn FieldName="Date" Header="Date" UnboundType="DateTime" UnboundExpression="GetDate([DateTime])" AllowEditing="False"/>
    <dxg:GridColumn FieldName="Time" Header="Time" UnboundType="DateTime" UnboundExpression="AddTicks(Today(), GetTimeOfDay([DateTime]))" AllowEditing="False" RoundDateTimeForColumnFilter="False">

wpf-spreadsheet-chart-api/CS/SpreadsheetWPFChartAPISamples/MainWindow.xaml#L48

xml
<dxg:TreeListControl.Columns>
    <dxg:TreeListColumn Header="Examples" FieldName="RegionName" AllowEditing="False" AllowBestFit="True" AllowDrop="False" AllowSearchPanel="False" />
</dxg:TreeListControl.Columns>

See Also

AllowEditing

Edit Cell Values in UI

ReadOnly

ColumnBase Class

ColumnBase Members

DevExpress.Xpf.Grid Namespace