My app. contains the window in the picture:
The ItemsSource of the DataGrid is set to _editList ( declared as IList < Vendor > _editList;).
The data grid is set to Read Only.
The Vendor Name text box has the binding set as : Text="{Binding ElementName=dataGridVendors, Path=SelectedItem.Name, Mode=TwoWay}"
This works well. However, as it is the Vendor Name cell only updates when the user is done typing in the Vendor Name textbox and clicks on something else. Say I want to change the vendor name to "John Lennon II" . I have to click on the textbox and type the characters I want to add and than I have to click on something else and only then the datagrid makes the update.
I want to make the update happen as the user types the characters....Is this possible ?
Regards, Sebastian
Add the UpdateSourceTrigger to your Binding
Text="{Binding ElementName=dataGridVendors, Path=SelectedItem.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Its default trigger is lost focus. When you change it to PropertyChanged the Updates will done when you're typing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With