Search code examples
winformsdatagridviewdatagridviewcolumn

how to remove row indicator column from datagridview in winforms c#


Please see the attached screenshot. How do I avoid/delete the extra column marked in red? Basically this column act as a row indicator. enter image description here


Solution

  • Set the RowHeadersVisible = false to hide the row header:

    dataGridView1.RowHeadersVisible = false;
    

    Remarks
    If the RowHeadersVisible property is false, a row whose Resizable property is set to true can still be resized in the user interface (UI) by clicking the mouse cursor anywhere along the bottom border of the row to be resized.