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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:12:57+00:00 2026-05-25T19:12:57+00:00

I have a datagrid in a Silverlight application. Clicking on the first row, and

  • 0

I have a datagrid in a Silverlight application. Clicking on the first row, and then pressing the Enter key causes the selection to move to the next row. I do not want this behavior – the Enter key is used for totally different purposes on this screen.

I realize that this is part of the editing framework, but I need a way to turn it off. I tried setting IsReadOnly to True (even though the control isn’t technically read-only) and that didn’t have any effect.

I attached to the datagrid KeyDown event but it’s not called when the Enter key is pressed. It works fine for other keys.

I’m stumped. Thanks for your help.

  • 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-05-25T19:12:58+00:00Added an answer on May 25, 2026 at 7:12 pm

    Yeah, that’s annoying.

    As far as I know, the only option is to create your own control that inherits from DataGrid, and do what is needed before passing the event on to the base.

    public class NewDataGrid : DataGrid 
    {     
        protected override void OnKeyDown(KeyEventArgs e)     
        {         
            if (e.Key == Key.Enter)         
            {
                //do what is needed here             
                e.Handled = true;         
            }         
            base.OnKeyDown(e);     
        } 
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datagrid in my Silverlight-3 application. When I select a row in
I have a Silverlight application that is using a DataGrid. Inside of that DataGrid
I have a DataGrid in my Silverlight application, and would like to highlight an
I am working in a Silverlight 4 application. I have a datagrid that I
I have created a sample silverlight application and trying to populated DataGrid with Data
I have a Silverlight 4 application that uses a DataGrid. This DataGrid is bound
I have a DataGrid in a Silverlight application. This application is using RIA Data
In my Silverlight application I have defined a datagrid with an template column containing
I have a Silverlight application that has a DataGrid and a DataPager. The data
I have a Silverlight application that has a DataGrid. I need to print the

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.