Andrew Hills asked 2017-05-04 11:57:45 UTC
Hi,
I can't seem to make the following work. Add a DataGridView control with 2 columns, contactID and firstName.
Refer to the firstName column: var col = this.datagridView1.Columns["firstName"]; gives me a null reference.
Refer to the column by the index: var col = this.datagridView1.Columns[1]; works just fine.
Hopefully it's something obvious that i'm missing here. Any help appreciated!
Andrew Hills asked 2017-05-04 11:57:45 UTC
Hi,
I can't seem to make the following work. Add a DataGridView control with 2 columns, contactID and firstName.
Refer to the firstName column: var col = this.datagridView1.Columns["firstName"]; gives me a null reference.
Refer to the column by the index: var col = this.datagridView1.Columns[1]; works just fine.
Hopefully it's something obvious that i'm missing here. Any help appreciated!