Reputation: 72
I'm using Visual Studio c++ forms. I took default datagridview from a tool box, and changed nothing from options. whenever I run program I get error message 'System.ArgumentOutOfRangeException', because not creating a new row to a table.
for (int i = 0; i < 3; ++i) {
datagridview->Rows[i]->Cells[1]->Value = i; }
Upvotes: 0
Views: 4799
Reputation: 72
I simply needed add this line of code which create new row:
datagridview->Rows->Add();
Upvotes: 1