Skip to content

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

Merged
LeafShi1 merged 2 commits into
dotnet:mainfrom
JayashreeSF3546:Fix_Issue_6361
Aug 31, 2026
Merged

LeafShi1 merged 2 commits into
dotnet:mainfrom
JayashreeSF3546:Fix_Issue_6361

Conversation

@JayashreeSF3546

@JayashreeSF3546 JayashreeSF3546 commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

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

@KlausLoeffelmann KlausLoeffelmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's take this for RC2!

@KlausLoeffelmann KlausLoeffelmann added this to the 11.0-rc2 milestone Aug 30, 2026
@LeafShi1
LeafShi1 merged commit 874c4f6 into dotnet:main Aug 31, 2026
8 checks passed
abineshPalanisamy pushed a commit to abineshPalanisamy/winforms that referenced this pull request Sep 3, 2026
…dless of what child control is focused. (dotnet#14744)

## 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.
@LeafShi1

LeafShi1 commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

This fix was missed in 11.0 RC2, so the milestone has been changed to 12.0.

@LeafShi1 LeafShi1 modified the milestones: 11.0-rc2, 12.0-preview1 Sep 24, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

3 participants