Is there any way to edit column names in a DataGridView?
You can also change the column name by using:
myDataGrid.Columns[0].HeaderText = "My Header"
but the myDataGrid
will need to have been bound to a DataSource
.
You can edit the header directly:
dataGridView1.Columns[0].HeaderCell.Value = "Created";
dataGridView1.Columns[1].HeaderCell.Value = "Name";
And so on for as many columns you have.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With