Skip to content

bound DataGridView with all invisible columns will display first column anyway #4807

@kirsan31

Description

@kirsan31
  • .NET Core Version: all up to latest (5.0.5)

  • Have you experienced this same bug with .NET Framework?: Yes

Problem description:
DataGridView with manual added columns. If your set on all of the columns Visible = false and then set DataSource you'll get 2 bugs:

  1. First column become visible to user.
  2. If RowHeadersVisible = false and AutoGenerateColumns = false column header will be partially visible.

Snipaste_2021-04-18_11-05-49

Expected behavior:
All columns must stay invisible.

Minimal repro:
WinFormsCoreTest_Grid_Menu.zip (See Form2.cs)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions