Boyz and Girlz,
I am calling a routine to update the DB from inside OnPropertyChanged(propertyname) like so...
protected void OnPropertyChanged(string name)
{
const string PROCNAME = "OnPropertyChanged";
try
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(name));
tempMethods.UpdateTempFromCollection(this, name);
}
}
catch (Exception ex)
{
ProgLog.Log(ex.Message, PROCNAME, MODNAME);
}
}
Now I need to get the disposition back to the WPF window but since the DB update is begin called via INotifyPropertyChanged on a property INSIDE of a collection it is not clear how to trap the disposition of the DB update and return user feedback to the window.
How have some of you handled this?
What I have tried:
I tried creating a feedback class that implements INotifyPropertyChanged and allowing my DB update routine to change a property inside this class. This approach results in the PropertyChangedEventHanlder begin NULL all the time - even if the triggering property is successfully modified.
My intention was to bind a label inside my WPF window to the DBFeedback property of my feedback class. No worky. :(
<Label x:Name="lblFeedback" Width="235" Height="30" Content="{Binding Path=UserFeedback.DBUpdate}" Grid.Column="1" HorizontalAlignment="Left" Margin="170,346,0,0" Grid.Row="1" VerticalAlignment="Top" Background="#FFEED8D8"/>