Hide the 1st Column of the DataGrid?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I was wondering if it was possible to hide the first column of the datagrid (windows form control). The column that I am referring to is the column created by the control that is gray in color and contains the selection arrow. My goal is to use the datagrid in place of a ListView control for performance reasons. To keep this new control like a ListView control, I need to not display this column. Any ideas?

Thanks in advance,

C. Buck
 
C. Buck,

You can set the RowHeadersVisible property to false, and it should not
display the row headers.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

CBuck said:
Hi, I was wondering if it was possible to hide the first column of the
datagrid (windows form control). The column that I am referring to is the
column created by the control that is gray in color and contains the
selection arrow. My goal is to use the datagrid in place of a ListView
control for performance reasons. To keep this new control like a ListView
control, I need to not display this column. Any ideas?
 
It's a hack, but I believe setting the width to 0 will do it for you.
CBuck said:
Hi, I was wondering if it was possible to hide the first column of the
datagrid (windows form control). The column that I am referring to is the
column created by the control that is gray in color and contains the
selection arrow. My goal is to use the datagrid in place of a ListView
control for performance reasons. To keep this new control like a ListView
control, I need to not display this column. Any ideas?
 
I tried doing that, and it made no difference. I am new to this control, so maybe I am missing something. Do you have a code snipet that does this?

- Thanks

- Buck
 
Back
Top