Hi @enchev,
and this method is called on every change of a page property:
protected Trent.Models.Trentdb.Kalkulationsposition kalkulationsposition
{
get
{
return _kalkulationsposition;
}
set
{
if (!object.Equals(_kalkulationsposition, value))
{
var args = new PropertyChangedEventArgs(){ Name = "kalkulationsposition", NewValue = value, OldValue = _kalkulationsposition };
_kalkulationsposition = value;
**OnPropertyChanged(args);**
Reload();
}
}
}
IEnumerable<Trent.Models.Trentdb.Artikel> _getArtikelsResult;
protected IEnumerable<Trent.Models.Trentdb.Artikel> getArtikelsResult
{
get
{
return _getArtikelsResult;
}
set
{
if (!object.Equals(_getArtikelsResult, value))
{
var args = new PropertyChangedEventArgs(){ Name = "getArtikelsResult", NewValue = value, OldValue = _getArtikelsResult };
_getArtikelsResult = value;
**OnPropertyChanged(args);**
Reload();
}
}
}
And so on for every Page property...
But i cant put any custom code in there because the OnPropertyChange method is in the generated code.
Im looking for a place where i can react on a property change of form components. E.g. a click on a selectbar component that is bound to a database column. I need to react on the change of the bound property value.
And i think that OnPropertyChange is the right place. but i cant customize it.
Hi @enchev,
are there any chance that RS will generate the OnPropertyChange Method as "partial" so that we can handle this event in our partial classes too?