WPF DataGrid: Make cells readonly

Solution 1:

Set DataGrid's IsReadOnly property to true.

<DataGrid Grid.Row="1" Grid.Column="1" Name="Grid" ItemsSource="{Binding}"
    IsReadOnly="True" AutoGenerateColumns="False" >

Solution 2:

If you want to make the cells of a certain column readonly, you can set IsReadOnly for that column:

<DataGridTextColumn Header="Name" IsReadOnly="True" Width="100" Binding="{Binding Path=Name}"></DataGridTextColumn>