在TextGridTextColumn中键入文本不起作用

时间:2018-04-06 10:27:12

标签: wpf datagrid datagridtextcolumn

..但粘贴文字确实如此。

可能是什么原因?

        <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>

1 个答案:

答案 0 :(得分:0)

尝试这样的事情:

       <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>