I am able to change all of the controls texts at runtime, expect my DataGridViews header text will not changed.
colName.HeaderText = FormOtherRes.Crc;
I tried DataGridView1.Refresh(); But it did not work. It seem working when I am debugging but the UI it not changing.
How can I change my columns headerText at runtime?
Dont create a datagridview column if you did something like that, if you want to change the already existing column in Datagridview, you can go for the below code. it would get change at Runtime.
dataGridView1.Columns["Old Column Name"].HeaderText = "New Grid Column Name";
or
dataGridView1.Columns[column_index].HeaderText = "New Grid Column Name";
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