-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WPF Gap: CollectionViewSource doesn't support all WPF scenarios #4307
Comments
We have the AdvancedCollectionView in the toolkit, but it doesn't support all the scenarios, and is already getting complex. It'd be great to just see this be within the platform and have the WPF version at least ported as a starting point. |
In general, it would be good to have as flexible version of CollectionViewSource as WPF's one, but it seems like you are focusing on not the most demanded things. CollectionViewSource in WPF is intended for in-memory data processing. But today most common data source is IQueryable from WebAPI or Entity Framework and it is not common to load whole table in the application to sort / group / filter it on the client side. Sometimes instead of EF folk uses Dapper where IQueryable is not available, but this is another story and it does not work well with CollectionViewSource too. It would be much better if WinUI team would focus more on modern online use cases rather than compatibility. |
@michael-hawker is this feature on any projected road-maps |
@LadderLogic I own the Windows Community Toolkit, so I don't know if there's plans on the WinUI side to work on this in the near future or not. I don't think @anawishnoff is the correct owner for this anymore, @gabbybilka who should own this now? We have an I'm not too sure where our gaps lie currently as we have some other helpers we've developed since for grouping scenarios. We want to improve our samples more later this year with our next release, so we'll have a better understanding then. I know @Sergio0694 has been making some examples of these scenarios for the MVVM Toolkit Samples, but not sure if they're merged into main yet or just in a PR. |
@michael-hawker Thank you! The AdvancedCollectionView works nicely for sort descriptors. Haven't found an example for grouping |
@michael-hawker, @Sergio0694, could you please provide a sample of how to use grouping in the AdvancedCollectionView? As I understand from the documentation, AdvancedCollectionView supports grouping. However, I could not find any example of how to use it. |
@kateryna-novak if you just need grouping, there's the ObservableGroup option as well as shown in the MVVM Toolkit app Collection sample: https://aka.ms/mvvmtoolkit/app |
@michael-hawker I need filtering and grouping. That's why I'm asking. |
Is it even possible to have a multi level grouping in ListView, DataGrid etc? There's no example anywhere. |
Proposal: CollectionViewSource doesn't support all WPF scenarios
Summary
The
CollectionViewSource
in UWP is inferior to the one in WPF doc here.The WPF one supports live filtering, grouping, and sorting all out of the box. The UWP one does not. ☹
For instance, this DataGrid grouping scenario is not easily achievable in UWP.
Rationale
Creating sorted, grouped, and/or filtered lists in UWP is a pain, especially trying to combine any combination of these. The
CollectionViewSource
is supposed to be this abstraction above the data layer itself. UWP/WinUI should provide a first/best-in-class solution to these common scenarios and match or improve upon the WPF APIs.Scope
Related to #2685 and #33
The text was updated successfully, but these errors were encountered: