If you can modify cell value, you won't be able to do full row select. So you have to disable cell editing. Then it will work.
WPF Datagrid unable to select full row when perform single click on cell
I have a normal Datagrid which bound to a observable collection.
Problem : When I perform single click on the [Price] or [Qty] cell, it will highlight the content inside the cell and let me edit but the respective row is not selected. Instead I have to perform a double click on the cell in order to edit and select the respective row at the same time (This is what I would like to achieve). I have look on the internet for few days but no one seems to have same problem like me instead they have the opposite (not very sure) scenario.
<Grid Grid.Row="1" Margin="10">
<DataGrid Name="dgProduct"
AutoGenerateColumns="False"
MaxWidth="930"
MinWidth="500"
CanUserAddRows="False"
SelectionUnit="FullRow"
SelectionMode="Single"
Padding="9"
ItemsSource="{Binding Path=ProductList, Mode=TwoWay}"
SelectedItem="{Binding Path=SelectedProduct, Mode=TwoWay}">
<DataGrid.Columns>
<DataGridTextColumn Header="" IsReadOnly="True" Binding="{Binding Path=Id}" />
<DataGridTextColumn Header="Product No." IsReadOnly="True" Binding="{Binding Path=Product_no}" />
<DataGridTextColumn Header="Name" IsReadOnly="True" Binding="{Binding Path=Name}" />
<DataGridTextColumn Header="Barcode" IsReadOnly="True" Binding="{Binding Path=Barcode}" />
<DataGridTextColumn Header="Price" Binding="{Binding Path=Price, UpdateSourceTrigger=PropertyChanged}" />
<DataGridTextColumn Header="Qty(Meter)" Binding="{Binding Path=Total_stock, UpdateSourceTrigger=PropertyChanged}"/>
<DataGridTextColumn Header="Subtotal" IsReadOnly="True" Binding="{Binding Path=Subtotal}" Width="*"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
The cell is in edit mode but not selected (SelectedProduct is still empty)
Thanks in advance.