Skip to content

Arrow navigation always prioritizes parent DataGridView control regardless of what child control is focused.#14744

Open
JayashreeSF3546 wants to merge 2 commits into
dotnet:mainfrom
JayashreeSF3546:Fix_Issue_6361
Open

Arrow navigation always prioritizes parent DataGridView control regardless of what child control is focused.#14744
JayashreeSF3546 wants to merge 2 commits into
dotnet:mainfrom
JayashreeSF3546:Fix_Issue_6361

Conversation

@JayashreeSF3546

@JayashreeSF3546 JayashreeSF3546 commented Jul 15, 2026

Copy link
Copy Markdown

Fixes #6361

Proposed changes

  • Added an early check in ProcessKeyPreview for WM_KEYDOWN / WM_SYSKEYDOWN and WM_SYSCHAR.
  • Skipped DataGridView preview handling when the key message targets a hosted child control instead of the DataGridView itself.
  • Preserved existing behavior for the active EditingControl to avoid edit-mode regressions.

Customer Impact

  • Fixes an issue where arrow keys intended for hosted child controls could be intercepted by the parent DataGridView.
  • Improves keyboard navigation behavior for controls hosted inside DataGridView.Controls.

Regression?

  • No

Risk

  • Low — the change is scoped to key preview handling and preserves existing behavior for the DataGridView and its EditingControl.

Screenshots

NA

Test methodology

  • Added tests for arrow key messages targeted at hosted child controls.
  • Verified that normal DataGridView arrow-key behavior remains unchanged when the grid itself is the target.
  • Verified that existing edit-mode behavior is preserved for the EditingControl.

Accessibility testing

N/A — no UI or accessibility surface change.

Test environment(s)

  • Windows 11
  • .NET SDK: 11.0.100-preview.3.26170.106
Microsoft Reviewers: Open in CodeFlow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arrow navigation always prioritizes parent DataGridView control regardless of what child control is focused.

2 participants