CRXPF0008 - In-place editing is not available when NavigationStyle is set to Row or None
- 2 minutes to read
Severity: Warning
The analyzer detects that you set the ColumnBase.AllowEditing or DataViewBase.AllowEditing property to true, and the DataViewBase.NavigationStyle property is not set to Cell. In this case, users cannot use in-place data editors to edit cell values. If the DataViewBase.NavigationStyle property is set to Row, you can still allow users to edit data in the Edit Form.
Examples
Invalid Code
<dxg:GridControl ...>
<dxg:GridControl.View>
<!-- A DevExpress.Xpf.Grid.DataViewBase descendant: -->
<dxg:TableView NavigationStyle="Row" .../>
<!-- OR -->
<dxg:TableView NavigationStyle="None" .../>
</dxg:GridControl.View>
<dxg:GridColumn FieldName="Name" AllowEditing="True"/>
<!-- ... -->
</dxg:GridControl>
Valid Code
<dxg:GridControl ...>
<dxg:GridControl.View>
<!-- A DevExpress.Xpf.Grid.DataViewBase descendant: -->
<dxg:TableView NavigationStyle="Cell" .../>
<!-- OR -->
<dxg:TableView .../>
</dxg:GridControl.View>
<dxg:GridColumn FieldName="Name" AllowEditing="True"/>
<!-- ... -->
</dxg:GridControl>
<!-- OR -->
<dxg:GridControl ...>
<dxg:GridControl.View>
<!-- A DevExpress.Xpf.Grid.DataViewBase descendant: -->
<dxg:TableView NavigationStyle="Row" EditFormShowMode="Inline" .../>
</dxg:GridControl.View>
<dxg:GridColumn FieldName="Name" AllowEditing="True"/>
<!-- ... -->
</dxg:GridControl>
How to Fix
Set the DataViewBase.NavigationStyle property to Cell to allow users to edit data in the grid’s in-place data editors.
If the DataViewBase.NavigationStyle property is set to Row, users can only edit data in the Edit Form. Specify the EditFormShowMode property to display an edit form when a user double-clicks a row.
Refer to the following help topic for more information: Data Editing and Validation.