In WPF, when working with the DataGrid, by default it will put a blank column on the left side of a DataGrid. This, I believe, is for selecting the row. However, it isn’t always nice looking and sometimes your users complain.
I’ve looked around for ways of getting rid of that empty column on the left side of the DataGrid. A solution which I find works, is putting in the attribute of RowHeaderWidth=”0″ in the DataGrid’s tag. Like this:
<DataGrid x:Name="DateTimeDataGrid"
BorderBrush="DarkGray"
ItemsSource="{Binding Times}"
SelectedItem="{Binding SelectedClassDate}"
BorderThickness="1"
AutoGenerateColumns="False"
CanUserAddRows="True"
CanUserReorderColumns="False"
RowHeaderWidth="0"
CanUserDeleteRows="True"
Height="125">
Here’s a post I found on Stack Overflow about this.