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

RoutedEvents for DataGrid #115

Open
CoolCoderSuper opened this issue Nov 14, 2024 · 3 comments
Open

RoutedEvents for DataGrid #115

CoolCoderSuper opened this issue Nov 14, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@CoolCoderSuper
Copy link

Is your feature request related to a problem? Please describe.

Most of the events on the data grid (CellEditEnded) do not have an associated RoutedEvent.

Describe the solution you'd like

Would it be possible to add RoutedEvent's to some of the DataGrid?

Describe alternatives you've considered

No response

Additional context

No response

@CoolCoderSuper CoolCoderSuper added the enhancement New feature or request label Nov 14, 2024
@CoolCoderSuper
Copy link
Author

CoolCoderSuper commented Nov 15, 2024

Is it fine if I open a PR to try and implement this?
I tried to implement it.
If we are to make it the same as the selection event it causes a breaking change on the event args constructor which is public.
So does this need to pushed out to v12 since it causes API breaking changes?

AvaloniaUI/Avalonia@19eb64b

@maxkatz6
Copy link
Member

Adding a new parameter to the constructor is a breaking change. Yes. You don't really need to change it though, as you can pass static event definition directly from there.

But saying this, why does this event need to be routed? Each routed event decreases performance, which might be noticeable with hundreds of cells on the screen. WPF also didn't have this event as routed https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.datagrid.preparingcellforedit?view=windowsdesktop-8.0

@CoolCoderSuper
Copy link
Author

Right, routed events would make it nicer to make bindings to the control.

But if it would cause any kind of performance degradation I can just find a different way to do it.

@MrJul MrJul transferred this issue from AvaloniaUI/Avalonia Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants