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

Enhance SplitPropertyPath to conditionally handle parentheses in prop… #16054

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

Abdesol
Copy link
Contributor

@Abdesol Abdesol commented Jun 18, 2024

What does the pull request do?

Parenthesis encircles the property type in front of properties in a property path. Example (Contact).Name. The SplitPropertyPath method from ReflectionHelper could not handle this, making datagrid cells automatically uneditable when there is a cast of property type in the path. Now, I am conditionally handling that, and the issue is resolved by removing the property type cast from the property path.

What is the current behavior?

property casting happens in a property path and automatically makes the datagrid cell uneditable when it is there.

What is the updated/expected behavior with this PR?

If there is a cast of a property type with parenthesis on the property path, it is removed from the path, and there is no making it uneditable because of that issue

Fixed issues

Fixes #15865

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049112-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@cla-avalonia
Copy link
Collaborator

cla-avalonia commented Jun 18, 2024

  • All contributors have signed the CLA.

@Abdesol
Copy link
Contributor Author

Abdesol commented Jun 18, 2024

@cla-avalonia agree

@Abdesol Abdesol force-pushed the issue-15865-fix branch 2 times, most recently from 9a96785 to 4f0a969 Compare June 18, 2024 19:02
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049124-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@grokys
Copy link
Member

grokys commented Jul 4, 2024

Could we get a failing/passing test combo in this PR to make reviewing easier, and to ensure we don't regress? See contributing for more information.

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050002-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Copy link
Member

@maxkatz6 maxkatz6 left a comment

Choose a reason for hiding this comment

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

Thank you!

@maxkatz6 maxkatz6 added this pull request to the merge queue Jul 11, 2024
Merged via the queue into AvaloniaUI:master with commit ab02e25 Jul 11, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't edit cells of datagrid with DataGridCollectionView in ItemsSource
5 participants