Skip to content

The WinformsControlTest project exited when clicking Column2 header after clicked the Change DGV font button #14471

Description

@Zheng-Li01

.NET version

main branch of Winforms repo

Did it work in .NET Framework?

Not tested/verified

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Repro in release/10.0, release/9.0, release/8.0 branch

Issue description

The WinformsControlTest project exited when clicking Column2 header after clicked the Change DGV font button

CallStack.mp4

Steps to reproduce

Test the sample app: WinformsControlTest in Winforms repo

  1. Run the WinformsControlTest project
  2. Click the DataGridView button to open the DataGridView dialog
  3. Click the Change DGV font button
  4. Click the Column2 header

Call Stack:

System.ArgumentException
  HResult=0x80070057
  Message=Object must be of type String.
  Source=System.Private.CoreLib
  StackTrace:
   at System.String.CompareTo(Object value)
   at System.Collections.Comparer.Compare(Object a, Object b)
   at System.Windows.Forms.DataGridViewRowCollection.RowComparer.CompareObjects(Object value1, Object value2, Int32 rowIndex1, Int32 rowIndex2) in C:\Users\v-olzhan\source\repos\winforms\src\System.Windows.Forms\System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.RowComparer.cs:line 114

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions