Wednesday, February 18, 2015

Remove Raw Header in DataGridView

By default, It displays a column with star mark in the DataGridView called Row Header. In many situations this Row Header needed to removed. So,you can remove this column by changing RowHeadersVisible property into False in Properties Window.


 
You can see the Row Header in my testing form application
 Programmatically, you can do that by adding following code segment to InitializeComponent() method in Form1.Designer.cs class( In my case)
this.dataGridView1.RowHeadersVisible = false;
On the other hand, you can also select the DatagridView and Right click on it then click on Properties

Change the property of RowHeadersVisible into False in Properties Window.
Now, I will remove the Row Header from the DataGridView.
D
Do not forget to leave your comments below.

2 comments:

  1. I have read your blog its very attractive and impressive. I like it your blog.

    Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training

    Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training Institutes

    ReplyDelete