docs-desktop icon indicating copy to clipboard operation
docs-desktop copied to clipboard

`DataGridView` docs should mention `MappingType.Hidden`

Open TymurGubayev opened this issue 3 years ago • 1 comments

Type of issue

Other (describe below)

Description

I was looking for a good way to exclude a DataColumn when the DataGridView is autogenerating its DataGridViewColumns. I somehow stumbled upon a way to do it: just setting the DataColumn.ColumnMapping = MappingType.Hidden does exactly what I wanted.

I think this should be mentioned at least on the How to: Remove Autogenerated Columns from a Windows Forms DataGridView Control, better yet also in the How to: Autogenerate Columns in a Data-Bound Windows Forms DataGridView Control, and even better throughout the DataGridView docs.

Page URL

https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/remove-autogenerated-columns-from-a-wf-datagridview-control

Content source URL

https://github.com/dotnet/docs-desktop/blob/main/dotnet-desktop-guide/winforms/controls/remove-autogenerated-columns-from-a-wf-datagridview-control.md

Document Version Independent Id

7e8ead7b-e2e1-a920-07d0-af8458fd9456

Article author

adegeo

Metadata

  • ID: 7e8ead7b-e2e1-a920-07d0-af8458fd9456
  • Service: dotnet-framework
  • Sub-service: winforms

TymurGubayev avatar Sep 29 '22 08:09 TymurGubayev

Thank you for opening this issue. I'll add it to the backlog. If you would like to contribute, you can submit a fix by editing the original article. Click on the Content Source link at the bottom of your original comment. To learn how to edit, see the Editing files in a repository article from GitHub.

Thanks again!

adegeo avatar Oct 19 '22 17:10 adegeo