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

DataGrid Row events don't fire #1370

Open
RaoHammas opened this issue Mar 2, 2025 · 1 comment
Open

DataGrid Row events don't fire #1370

RaoHammas opened this issue Mar 2, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@RaoHammas
Copy link

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

  1. Create a DataGrid
  2. Assign ItemSource
  3. Set Row event
  4. 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

@RaoHammas RaoHammas added the bug Something isn't working label Mar 2, 2025
@chucker
Copy link
Collaborator

chucker commented Mar 2, 2025

Something in DefaultDataGridRowStyle appears to break it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants