Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Silverlight TV 44: Top Four Questions from the WCF RIA Services Forum
Oct 25, 2010 at 8:07 AMHello everyone,
I think it can be done doing this:
For the group you must check for collectionchanged. Then you must create a method for update.
public partial class GroupAction { protected override void OnLoaded(bool isInitialLoad) { base.OnLoaded(isInitialLoad); ((INotifyCollectionChanged)this.SingleActions).CollectionChanged += (s, e) => { RaisePropertyChanged("TotalCost"); }; } public void UpdateProperty(string name) { RaisePropertyChanged(name); } //[Bindable(true, BindingDirection.TwoWay)] [Editable(false)] public decimal TotalCost { get { return this.SingleActions.Sum(sa => sa.Total); } } }then call the update method from the child:
public partial class SingleAction { partial void OnPriceChanged() { RaisePropertyChanged("Total"); if (GroupAction != null) GroupAction.UpdateProperty("TotalCost"); } partial void OnQuantChanged() { RaisePropertyChanged("Total"); if (GroupAction != null) GroupAction.UpdateProperty("TotalCost"); } //[Bindable(true, BindingDirection.TwoWay)] [Editable(false)] public decimal Total { get { return this.Price * this.Quant; } }Cheers