Dropped DGV in a form -> Edit Columns and added all DGV column types. But instead of ten columns, I got an extra one.
How do I get rid of this extra column. I already set ColumnsCount=10 in code behind but to no avail.
OK, see it. That should be the blank area between the last column and the visibility menu. If you set the columns to AutoSizeMode=Fill then they will spring to fill the grid. I also see the “$h” text in the column header of the row header column. Which I have seen before but could never reproduce but now I can after resetting some style properties. So that will also be logged and fixed.
Do you mean the column with the grid menu?
If yes, that’s not a column, it’s the column visibility menu (ShowColumnVisibilityMenu property – can set it to false to hide it). With one of the early Material-3 themes the icon was not visible so it looked like an extra column.
If not, please send me a screenshot and also check what name the column got if it’s visible in the columns editor.