Skip to content

Support appending a DataGridView combo box item collection to itself - #15522

Open
XFEstudio wants to merge 1 commit into
dotnet:mainfrom
XFEstudio:fix/winforms-grid-combobox-self-add-range-nov27
Open

XFEstudio wants to merge 1 commit into
dotnet:mainfrom
XFEstudio:fix/winforms-grid-combobox-self-add-range-nov27

Conversation

@XFEstudio

@XFEstudio XFEstudio commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Proposed changes

Handle self-addition through the existing bulk insertion path.

Customer Impact

Passing cell.Items to cell.Items.AddRange currently appends one item before throwing because the list changed during enumeration. The operation now duplicates every item and respects sorting.

Regression?

Introduction point unknown. Reproduced on .NET 10 and the upstream baseline.

Risk

The shared insertion path still validates null items, sorts, and updates the cell. Tests cover sorted and unsorted cells and the existing null argument behavior.

Test methodology

2 regression cases failed on the baseline. 35 related tests passed with 0 skipped after the fix. The test project built with 0 warnings and 0 errors. Windows validation.

Test environment(s)

Windows x64 Debug with the repository .NET 12 SDK.

Developed with AI assistance and independently reviewed by an AI agent.

Microsoft Reviewers: Open in CodeFlow

@XFEstudio
XFEstudio requested a review from a team as a code owner November 27, 2026 06:11
@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.23472%. Comparing base (d7f39b1) to head (7bb7512).

Additional details and impacted files
@@              Coverage Diff              @@
##                main      #15522   +/-   ##
=============================================
  Coverage   41.23472%   41.23472%           
=============================================
  Files            247         247           
  Lines           9897        9897           
  Branches        1049        1049           
=============================================
  Hits            4081        4081           
  Misses          5621        5621           
  Partials         195         195           
Flag Coverage Δ
Debug 41.23472% <ø> (ø)
production 43.92353% <ø> (ø)
test 19.92786% <ø> (ø)
unit 43.92353% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant