DataGrid Row events don't fire
Open
Nobody has claimed this yet.
bug
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Hi,
I'm trying to have row double click functionalty on the datagrid but the events don't fire. In normal WPF the events do fire when set using this way 👇
<ui:DataGrid
Margin="0,10,0,0"
AutoGenerateColumns="False"
BorderBrush="{DynamicResource ControlStrongFillColorDarkBrush}"
BorderThickness="1"
CanUserReorderColumns="True"
CanUserResizeColumns="True"
CanUserSortColumns="True"
GridLinesVisibility="All"
IsReadOnly="True"
ItemsSource="{Binding Clients}"
SelectionMode="Single"
SelectionUnit="FullRow">
<ui:DataGrid.Resources>
<Style TargetType="DataGridRow">
<EventSetter Event="MouseDoubleClick" Handler="Control_OnMouseDoubleClick" />
</Style>
</ui:DataGrid.Resources>
</ui:DataGrid>
To Reproduce
- Create a DataGrid
- Assign ItemSource
- Set Row event
- See events don't fire
Expected behavior
Row events must fire.
Screenshots
No response
OS version
Win 11
.NET version
.Net 8
WPF-UI NuGet version
4.0.2
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the DataGrid example from the issue on Windows 11 with .NET 8 and WPF-UI 4.0.2, then trace the DataGrid row event handling. Done means a DataGridRow MouseDoubleClick EventSetter fires when a row is double-clicked, while preserving the reported configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100