-
Could be I don't understand how this is supposed to work... I have a cache:
I have a ReadonlyObservableCollection: I have a massive filter: (The predicate is just watching a few other properties and running a select on this filter)
And finally I have the binding of the source cache to the observable list
What I expected to happen is that filters gets rerun when any model's qty changes, which would filter out any models whose parent model's have a qty of zero. This doesn't happen, in fact, nothing seems to happen when the qty gets changed. Also, how bad is this? Am I on the right track with Dynamic Data or is this making your eyes bleed? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Of course I immediately get it working! I'll leave this post here in case someone is facing a similar situation. Still very curious as to thoughts on implementation. Added a new filter:
Updated the binding
If I understand correctly, the problem was two-fold. First, Because addonFilter was behind a predicate watching several properties, it wouldn't get run even if the qty of the model changed. Second, I wasn't watching the parent qty, just the qty. Still not entirely sure what difference this would have made as technically the parent qty is just another model's qty. However, I think this is more efficient as it will only trigger for parent's and not every addon change. |
Beta Was this translation helpful? Give feedback.
Of course I immediately get it working! I'll leave this post here in case someone is facing a similar situation. Still very curious as to thoughts on implementation.
Added a new filter:
Updated the binding