In the above code, I am getting the error message as "Object reference not set to an instance of an object". I am not above to rectify the problem. Can you help me out to get rid of this error message?Code:int x=0; foreach(DataGridViewRow r1 in this.DataGridView1.Rows) { if((bool)DataGridView.["CheckBox1", i].value) { //my_code_goes_here } x++; }
Bookmarks