Home Forums WPF controls Xceed DataGrid for WPF Handling Double-Click on a Row

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24824 |

    I’m looking for a way to bind code to the double-click on a DataRow. I came came across this post:

    http://forums.xceed.com/forums/ShowPost.aspx?PostID=5674

    But I don’t want to bind every DataGrid in my app. Just 1 of the 5.

    Is there another way?

    Imported from legacy forums. Posted by Brian (had 678 views)

    User (Old forums)
    Member
    Post count: 23064

    You could try:
    <Grid>
    <Grid.Resources>
    <Style x:Key=”DataRowStyle” TargetType=”{x:Type xcdg:DataRow}”>
    <EventSetter Event=”MouseDoubleClick” Handler=”xcdgInterestCodes_MouseDoubleClick” />
    </Style>
    <Grid.Resources>

    <xcdg:DataGridControl Name=”xcdgMyDataGrid”
    ….
    ItemContainerStyle=”{StaticResource ContactMethodsDataRowStyle}”
    />

    </Grid>

    Imported from legacy forums. Posted by Jason (had 510 views)

    User (Old forums)
    Member
    Post count: 23064

    oops typo in the post above (style names didnt match)

    <Grid>
    <Grid.Resources>
    <Style x:Key=”DataRowStyle” TargetType=”{x:Type xcdg:DataRow}”>
    <EventSetter Event=”MouseDoubleClick” Handler=”xcdgInterestCodes_MouseDoubleClick” />
    </Style>
    <Grid.Resources>

    <xcdg:DataGridControl Name=”xcdgMyDataGrid”
    ….
    ItemContainerStyle=”{StaticResource DataRowStyle}”
    />

    </Grid>

    Imported from legacy forums. Posted by Jason (had 425 views)

    User (Old forums)
    Member
    Post count: 23064

    That works. Thanks!

    Imported from legacy forums. Posted by Brian (had 3714 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.