UpdateSourceTrigger=PropertyChanged not working for DataGridTextColumn? #902
Unanswered
c4rlosmarin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to apply a binding for my datagrid so that I can capture the change to the cells as it happens, but for some reason, I can only get to trigger the PropertyChanged event after the cell loses its focus. The same works flawlessly with a regular Textbox, meaning that the OnNameChanged and OnNameChanging events are triggered as soon as the key is down. I was able to properly make it work by adding a custom column with a Textbox in it, however everything regarding tab navigation among all the cells in the DataGrid became really cumbersome after taking that approach.
What am I missing?
`
`
using App1.Helpers;
using Windows.UI.ViewManagement;
using App1.ViewModels;
namespace App1;
public sealed partial class MainWindow : WindowEx
{
public MainViewModel? ViewModel { get; }
private Microsoft.UI.Dispatching.DispatcherQueue dispatcherQueue;
private UISettings settings;
}
`
`using System.Collections.ObjectModel;
using System.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;
namespace App1.ViewModels;
public partial class MainViewModel : ObservableRecipient
{
[ObservableProperty]
public string name;
}
public partial class ParameterViewModel : ObservableRecipient
{
[ObservableProperty]
public string key;
[ObservableProperty]
public string value;
[ObservableProperty]
public string description;
}
`
Beta Was this translation helpful? Give feedback.
All reactions