96

I was wondering if when using the datagridview control you can remove the thing that looks like a column before the 1st column. I think its used to select rows but not sure what its called.

Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
Grant
  • 11,138
  • 32
  • 94
  • 140

2 Answers2

163

Here is a solution for standard windows controls in C#.

To hide the row headers you can use the property RowHeadersVisible and set it to false.

To make the row headers smaller you can use the property RowHeadersWidth.

starball
  • 20,030
  • 7
  • 43
  • 238
buda
  • 2,372
  • 1
  • 18
  • 23
  • 5
    it actually is RowHeadersVisible and not RowHeaderVisible; tried to update post but it weren't enough modified characters... – libjup Jul 23 '13 at 06:41
  • 1
    A link to the windows forms `DataGridView` `RowHeadersVisible` property msdn documentation: http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.rowheadersvisible(v=vs.110).aspx – Jo Smo Nov 27 '14 at 17:45
  • Thanks. This helped. I wonder why do we need to click the column though! Any idea how to hide it by-default? Let me know. – Abhay Bh Jul 09 '21 at 07:08
1

Set the RowHeadersVisible property to False and it will work like a charm