Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9267981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:41:27+00:00 2026-06-18T14:41:27+00:00

I have the following DataGrid: <DataGrid SelectedItem={Binding CurrentX} ColumnWidth=* ItemsSource={Binding Model.Xlist, Mode=TwoWay} AutoGenerateColumns=False> <DataGrid.Columns>

  • 0

I have the following DataGrid:

<DataGrid SelectedItem="{Binding CurrentX}" ColumnWidth="*" ItemsSource="{Binding Model.Xlist, Mode=TwoWay}" AutoGenerateColumns="False">
        <DataGrid.Columns>
      <DataGridTemplateColumn Width="Auto" Header="GO">
                <DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <Image Width="30" Height="30" Source="../Resources/xx.ico" MouseDown="Image_MouseDown">
                        </Image>
                    </DataTemplate>
                </DataGridTemplateColumn.CellTemplate>
            </DataGridTemplateColumn>
        </DataGrid.Columns>
</DataGrid>

When I click on a row the click occurs before binding to SelectedItem, I want it to be in the opposite way(first the binding and then the event of the click),

it is possible to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:41:28+00:00Added an answer on June 18, 2026 at 2:41 pm

    I had similar problem. Use MouseUp event:

    <my:DataGridTemplateColumn Width="18" CanUserResize="False">
        <my:DataGridTemplateColumn.CellTemplate>
            <DataTemplate>
                <Image Width="16" Style="{StaticResource ImageStyle}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="MouseUp">
                            <cmd:EventToCommand Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.ShowErrorMessageCommand}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Image>
            </DataTemplate>
        </my:DataGridTemplateColumn.CellTemplate>
    </my:DataGridTemplateColumn>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a following XAML: <DataGrid Name=nodeDataGrid ItemsSource={Binding NodeList} AutoGenerateColumns=False RowBackground=White AlternatingRowBackground=AliceBlue Grid.Column=1 HorizontalAlignment=Stretch
I have following DataGrid in wpf. <DataGrid AutoGenerateColumns=False Grid.Row=1 Name=adsGrid ItemsSource={Binding Path=Ads} CanUserAddRows=False CanUserDeleteRows=False
I have the following datagrid in a wpf form: <DataGrid Name=DataGrid AutoGenerateColumns=False VerticalScrollBarVisibility=Auto> <DataGrid.Columns>
I have a DataGrid , follow the XAML : <DataGrid ItemsSource={Binding Path=propCollection} SelectedItem={Binding Path=SelectProp,
I have the following DataGrid <DataGrid> <DataGrid.Columns> <DataGridTextColumn Header=Registro Binding={Binding NumeroRegistro} /> <DataGridTextColumn Header=Nome
E.g. I have following datagrid <mx:DataGrid x=331 y=16 height=132 width=419 id=me_claimed dataProvider={users.myclaims} useRollOver=false> <mx:columns>
I have this datagrid <DataGrid Grid.Row=3 Name=DataGrid6S AutoGenerateColumns=False VerticalScrollBarVisibility=Auto> <DataGrid.Columns> <DataGridTextColumn Header=ID Width=50 Binding={Binding
I have the following XAML markup in a WPF DataGrid: <DataGrid ItemsSource={Binding ResultList} Grid.ColumnSpan=4
I have the following datagrid: <asp:DataGrid runat=server ID=gastosReembolsables ShowFooter=True AutoGenerateColumns=False> <AlternatingItemStyle CssClass=DATAitem2></AlternatingItemStyle> <ItemStyle CssClass=DATAitem1></ItemStyle>
I have the following XAML Code: <sdk:DataGrid Margin=58,8,52,18 Name=dataGridTickets> <sdk:DataGrid.Columns> <sdk:DataGridTextColumn x:Name=ticketNoColumn Header=Ticket No.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.