Skip to main content
All docs
V26.1
  • Troubleshooting: Edit Cell Values

    • 4 minutes to read

    This topic contains a list of the most common cell editing issues and describes how you can resolve them.

    The Entire View, Certain Columns, or Certain Cells Are Read-Only

    Problem

    You cannot edit cell data in the entire view, certain columns, or certain cells.

    Solution

    Check that the following conditions are satisfied:

    • Columns are bound to data source fields. Use either ColumnBase.FieldName or ColumnBase.Binding to bind your column to a data source property.
    • The data source property has a public setter.
    • If you set a column’s ColumnBase.Binding property, the binding’s Mode should be TwoWay:

      <dxg:GridColumn Header="Id" FieldName="col1" Binding="{Binding Path=Id, Mode=TwoWay}"/>
      
    • If you set a column’s Binding property, ColumnBase.FieldName should not use an existing property name. See the “INCORRECT” and “CORRECT” examples below.

      <!--INCORRECT-->
      <dxg:GridColumn Header="Id" FieldName="Id" Binding="{Binding Path=Id, Mode=TwoWay}"/>  
      <!--CORRECT-->
      <dxg:GridColumn Header="Id" FieldName="col1" Binding="{Binding Path=Id, Mode=TwoWay}"/>  
      <!--CORRECT-->
      <dxg:GridColumn Header="Id" Binding="{Binding Path=Id, Mode=TwoWay}"/> 
      
    • Ensure that you did not change settings or write code that disabled data editing functionality. Review your implementation and see if you use any of the techniques from the following topic: Make Cells Read-only or Disable Editing.

    • If you use the GridControl in Server Mode, note that the following server mode data sources are initially read-only: WcfInstantFeedbackSource, EntityServerModeDataSource, and LinqServerModeDataSource. To enable data editing functionality, implement CRUD operations as illustrated in the following example: Implement CRUD Operations in the WPF Data Grid.

    • Virtual Source components support data editing in v20.1 and higher. Refer to the following help topic for more information: Enable Data Editing.

    The Grid Control Doesn’t Create Columns for Collection Properties or Such Columns are Read-Only

    Problem

    The GridControl does not generate columns for collection properties. Such properties are usually used to populate detail grid controls.

    You can bind a column to a collection property manually. However, you need to take additional steps to enable data editing.

    Solution

    Use one of the following solutions:

    Cell Value Is Different in Edit and Display Modes

    Problem

    Cells in your GridControl display different values in edit and display modes.

    Solution

    See the Works in Edit Mode column in the table from the Format Cell Values help topic.

    Cells Are Empty

    Problem

    Cells in your GridControl display no values. The image below shows a common scenario where you see editor borders in cells but no content.

    Empty Editors

    Solution

    Use one of the following solutions: