DataGridView failing to format and resize
Hello everyone.
I am having a problem resizing & defaultcellstyle formating my dataGridView
Below is the code am using
this.datagridview.columns[‘’column name”].defaultcellstyle.format = “n0”;
dataGridView.columns[“column name”].widith = 200;
Below is the error I am getting
“NullReferenceException was unhandled”
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Jignesh KumarRank #91 · 22.9K reputationPosted Jun 25, 2020, 2:28 AM EDT
Marvin kakuruRank #3,979 · 374 reputationPosted Jun 26, 2020, 2:31 AM EDT