(See When this Collection View Source is set as the Items Source of a List Box, it will yield a view of the collection (namely, a List Collection View) in which the characters are grouped by gender and sorted by first name.Here is what the List Box declaration might look like: The image below depicts our List Box with grouping and sorting.Not only would such a synchronization routine be complex, but it is also likely to be .
Then the items will once again be properly grouped and sorted.
Here is a routine that includes the Refresh() call: After calling Refresh(), the modified character now appears in the correct group and sort location, as shown here: Unfortunately, the Refresh() method results in a complete regeneration of the view.
If I instead just remove the item, and just re-insert it, it’s as close as I can get to instantaneous. So I’m asking the great Dr, that has given us all such great in depth knowledge in the past, what can we do about this in a more generic fashion? What would you suggest I do if I have a collection of a type that I don’t know about at compile time? Dear Patient-X, I’ve been wondering what I could file under the letter ‘E’ in this series, and now you’ve afforded me the perfect opportunity! Understanding the List Collection View Class You are binding to a list of items.
🙂 No, you are not lost in your path to enlightenment. More specifically, you are binding to a collection of Person objects (namely an Observable Collection) that, in turn, implements the IList interface.
It is a rather drastic operation, to say the least.