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 8871565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:01:11+00:00 2026-06-14T18:01:11+00:00

I have 2 datagrid on click i add item in other as in image

  • 0

enter image description here

I have 2 datagrid on click i add item in other as in image but when i click on scroll bar Thumb or shaft multi time for scrolling it add item on other datagrid Please help me on this

here is Code

                    <DataGrid Name="dgMenu" Grid.Row="1" Grid.RowSpan="4" Margin="5,0,0,0" AutoGenerateColumns="False" RowHeight="25"  AlternatingRowBackground="{StaticResource AlternateRowBackgroundBrush}" IsReadOnly="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
              HeadersVisibility="Column" SelectionUnit="FullRow" ItemsSource="{Binding DgMenuCollection,Mode=TwoWay}" SelectedItem="{Binding DgSelectedMenu,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" PreviewKeyUp="dgMenu_PreviewKeyUp"
              VerticalGridLinesBrush="{StaticResource GridLineColorBrush}" HorizontalGridLinesBrush="{StaticResource GridLineColorBrush}" Grid.Column="0" Grid.ColumnSpan="2" MouseDoubleClick="dgMenu_MouseDoubleClick">
                        <DataGrid.Resources>
                            <Style TargetType="{x:Type DataGridCell}">
                                <Style.Triggers>
                                    <Trigger Property="DataGridCell.IsSelected" Value="True">
                                        <Setter Property="Background" Value="{StaticResource ButtonSelectedBrush}"  />
                                        <Setter Property="BorderBrush" Value="#A8E3FC" />
                                        <Setter Property="Foreground" Value="Black" />
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </DataGrid.Resources>
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Code" Binding="{Binding PN_Recipe.RecipeCode}" />
                            <DataGridTextColumn Header="Recipe Name" Binding="{Binding PN_Recipe.RecipeName}"/>
                            <DataGridTextColumn Header="RecipeHalf Price" Binding="{Binding HalfMenuCost}" Visibility="Collapsed"  />
                            <DataGridTextColumn Header="MenuFull Price" Binding="{Binding FullMenuCost}" Visibility="Collapsed"/>
                        </DataGrid.Columns>
                    </DataGrid>
  • 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-14T18:01:12+00:00Added an answer on June 14, 2026 at 6:01 pm

    I assume the Problem is because of the PreviewKeyUp="dgMenu_PreviewKeyUp" Instead of using PreviewKeyUp, you could you Mouse Double Click event to add the item.

    If i am mistaken, my apologies.

    Regards

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to have a double click event on a datagrid in Flex3. The
I have a DataGrid that represents layers - each row is an image on
I have a DataGrid in WPF. And I am trying to add Button s
Consider i have a dataGrid that is created dynamically. Now i need to add
I have a datagrid which I am using LINQ to fill, I then add
I have a DataGrid defined as follows. When I click a cell in the
In Silverlight 5, I have a DataGrid with a ContextMenuService.ContextMenu . If you click
I have a datagrid with one row intially. When I click on the first
I have a Datagrid in Flex. I need to add a radio button in
I have a ContextMenu on a DataGrid and I'm trying to capture the MenuItem.Click

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.