Skip to content

Allow Columns to be modified / re-ordered for HierarchicalDataSources #310

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

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

danwalmsley
Copy link
Member

HierarchicalTreeDataGridSource handles OnColumnsCollectionChanged to grab a reference to the expander columns.

However it throws NotImplementException for all actions other than Add, this prevents the user from re-ordering the columns at runtime.

It currently works for Flat sources, but this minor bug prevents it from working for Hierarchical sources.

How the fix works:

simply no need to throw NotImplementedException here.

… are re-ordered.

this was preventing users from changing the column order at runtime.
@danwalmsley danwalmsley requested review from danipen and grokys October 10, 2024 22:07
Copy link
Member

@grokys grokys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work when e.g. removing or replacing an expander column, but I'm fine with this for the moment.

@grokys
Copy link
Member

grokys commented Oct 10, 2024

Maybe it should check whether an expander column has been added or removed and throw in that case?

@danwalmsley
Copy link
Member Author

Maybe it should check whether an expander column has been added or removed and throw in that case?

will handle these cases

@danwalmsley danwalmsley force-pushed the fixes/allow-reordering-tree-columns branch from ce29de0 to 0565c43 Compare October 11, 2024 09:48
Copy link
Member

@grokys grokys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@grokys grokys merged commit 7765da6 into master Oct 14, 2024
3 checks passed
@grokys grokys deleted the fixes/allow-reordering-tree-columns branch October 14, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants