Skip to content
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

replaced AdvancedCollectionView with custom CollectionView #91

Merged
merged 2 commits into from
Jan 11, 2025

Conversation

w-ahmad
Copy link
Owner

@w-ahmad w-ahmad commented Jan 9, 2025

Closes #42, #52, #89

This PR replaces the use of CommunityToolkit.WinUI.Collections/AdvancedCollectionView with a custom CollectionView, introduces changes to column generation behavior, and resolves issues related to property access for sorting and filtering.


Fixes

  • #42: Fixed an issue where an empty property path caused a crash during operations.
  • #89: Resolved a crash caused by null values in column filters.

Changes

  1. Custom CollectionView Implementation

    • Replaced CommunityToolkit.WinUI.Collections/AdvancedCollectionView with an internal CollectionView type to avoid conflicts with external dependencies. #52
    • The TableView.CollectionView property has been removed.
    • Introduced two new properties to manage custom sorting and filtering:
      • SortDescriptions: A collection of sort descriptions applied to the items.
      • FilterDescriptions: A collection of filter descriptions applied to the items.
  2. Auto Generate Columns for Primitive types

    • There will be a single column with empty Binding and Headerif theItemsSourceis a collection ofPrimitive` types.
  3. Enhanced Property Access for Operations

    • Added a new virtual method in TableViewColumn to retrieves cell content for sorting, filtering, copying, and exporting operations:
      public virtual object? GetCellContent(object? dataItem)
  4. Improved Value Handling

    • Sort, filter, copy, and export operations now leverage converters defined in the column's Binding to obtain the final value.#26

@w-ahmad w-ahmad merged commit 27f9e86 into main Jan 11, 2025
1 check passed
@w-ahmad w-ahmad deleted the CollectionView branch January 17, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant