New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cell using 'DisplayMember' to find and set value resulting in setting bad value. #11311
Comments
Maybe its the Lines 8 to 33 in c926856
|
@Olina-Zhang can your team please test this to confirm? |
I tried setting breakpoint at this method and it was never executed.
|
@elachlan This issue also repro's in .NET9.0/8.0/7.0/6.0/5.0/3.1 and .NET framework app. 11311.mp4 |
Sent from my iPhoneOn May 6, 2024, at 3:44 AM, Melon Wang1 ***@***.***> wrote:
This issue also repro's in .NET9.0/8.0/7.0/6.0/5.0/3.1 and .NET framework app.
https://github.com/dotnet/winforms/assets/94418985/c3a31d06-b5a0-4f4e-bc3a-431f6af9a17c
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
The stack trace when switching Kitten name:
Click on KittenId column:
|
Assigning this to @KlausLoeffelmann to evaluate. That said, this may not meet the bar for .NET if it works the same way in .NET Framework. We'll let you know. |
Hey and thanks. Looking forward to any information maybe there's some simple workaround? |
.NET version
Did it work in .NET Framework?
Not tested/verified
Did it work in any of the earlier releases of .NET Core or .NET 5+?
No response
Issue description
I created very simple showcase here https://github.com/bukowa/Issue_WinForms_FormattedValue
As you can see if the
DisplayMember
returns the same value it will always be set to the first one.Basically the value will be set to the first matching occurence of the
DisplayMember
found in theBindingList
.The code is here
winforms/src/System.Windows.Forms/src/System/Windows/Forms/Controls/DataGridView/DataGridViewComboBoxCell.cs
Line 1508 in 1e92b29
winforms/src/System.Windows.Forms/src/System/Windows/Forms/Controls/DataGridView/DataGridViewComboBoxCell.cs
Line 1674 in 1e92b29
Steps to reproduce
https://github.com/bukowa/Issue_WinForms_FormattedValue
The text was updated successfully, but these errors were encountered: