I have a DataGrid as described below. When I click a cell in the DataGrid, the cell is highlighted. How can I change it so that when I click on a cell the entire row is highlighted?
<DataGrid Name="fileGrid" AutoGenerateColumns="False" Height="150" Width="Auto" Margin="10,10,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" SelectionChanged="fileGrid_SelectionChanged"> <DataGrid.Columns> <DataGridTextColumn Header="Company Name" x:Name="columnCompanyName" Binding="{Binding Path=Customer.CompanyName}" IsReadOnly="True"> </DataGridTextColumn> <DataGridTextColumn Header="Customer Surname" x:Name="columnCustomerSurname" Binding="{Binding Path=Customer.Surname}" IsReadOnly="True"> </DataGridTextColumn> <DataGridTextColumn Header="Customer Address" x:Name="columnAddressLine1" Binding="{Binding Path=Customer.Address.Line1}" IsReadOnly="True"> </DataGridTextColumn> <DataGridTextColumn Header="Customer City" x:Name="columnCity" Binding="{Binding Path=Customer.Address.City}" IsReadOnly="True"> </DataGridTextColumn> </DataGrid.Columns> </DataGrid>
source share