I have a datagridview that populates with two datagridviewbuttoncolumns(column 0 & 1) when the form loads. The datagridview is on a tab control.The tab with the datagridview is not the first tab to be shown. I need to be able to reference the cells in the datagridview and I am using datagridview1.Rows(1).Cells(2).Value.
For testing purposes, I have created a button that fires a message box with cell 2, 3, and 4's value. When the form first loads, I can click the button and I get the correct value for what is in cell 2,3 and 4 with no issue (Correct Values: 'Boy', '27', 'January'). When I go to the tab with the datagridview and try to click the test button again, it appears that all the cell indexes are shifting to the right by 2 (New-Incorrect Values: '', '', 'Boy' or NOTHING, NOTHING, 'Boy'). I am not changing anything with the code, it only happens once I go to the tab with the datagridview. Its is almost like the buttoncolumns are messing it up.
Does anyone have and ideas or direction to workaround this?