wpfdatagriddatagridtextcolumn

Typing Text into DataGridTextColumn doesn´t work


.. but pasting text does.

What could be the reason?

        <DataGrid  AutoGenerateColumns="false" Name="dataGrid" InitializingNewItem="dataGrid_InitializingNewItem" ItemsSource="{Binding SchadwagenVorgänge}">
        <DataGrid.Columns>
            <DataGridTextColumn  Header="Bezeichnung" Width="*" Binding="{Binding Description}"  />
            <DataGridTextColumn  Header="Sortierposition" Width="Auto" Binding="{Binding SortOrder}"  />
            <DataGridCheckBoxColumn  Header="Umstellung" Width="Auto" Binding="{Binding ChangeOver }"   />
        </DataGrid.Columns>
    </DataGrid>

Solution

  • Try something like this:

           <DataGrid  AutoGenerateColumns="false" Name="dataGrid" 
           InitializingNewItem="dataGrid_InitializingNewItem" ItemsSource=" {Binding SchadwagenVorgänge}">
        <DataGrid.Columns>
            <DataGridTextColumn IsReadOnly="False"  Header="Bezeichnung" Width="*" Binding="{Binding Description}"  />
            <DataGridTextColumn IsReadOnly="False"  Header="Sortierposition" Width="Auto" Binding="{Binding SortOrder}"  />
            <DataGridCheckBoxColumn  Header="Umstellung" Width="Auto" Binding="{Binding ChangeOver }"   />
        </DataGrid.Columns>
    </DataGrid>