How Do I Hide wpf datagrid row selector
Instead of setting the Width you can completely hide the row headers by setting on the DataGrid
HeadersVisibility="Column"
Use the RowHeaderWidth
property:
<my:DataGrid RowHeaderWidth="0" AutoGenerateColumns="False" Name="dataGrid1" />
Note that you can also specify a style or template for it also, should you decide you really do like it and want to keep it because you can do something cool with it.
To remove the Row header(Gray field) in Datagrid in WPF
<DataGrid x:Name="TrkDataGrid" HeadersVisibility="Column">
</DataGrid>
To remove or hide the Column Header in DataGrid WPF
<DataGrid x:Name="TrkDataGrid" HeadersVisibility="Row">
</DataGrid>
To remove or hide both Column and Row Header in DataGrid WPF
<DataGrid x:Name="TrkDataGrid" HeadersVisibility="None">
</DataGrid>